|
1 |
| -<UserControl x:Class="WPFDevelopers.Samples.ExampleViews.ThermometerExample" |
2 |
| - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 |
| - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 |
| - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 |
| - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 |
| - xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers" |
7 |
| - xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls" |
8 |
| - xmlns:local="clr-namespace:WPFDevelopers.Samples.ExampleViews" |
9 |
| - mc:Ignorable="d" |
10 |
| - d:DesignHeight="450" d:DesignWidth="800"> |
| 1 | +<UserControl |
| 2 | + x:Class="WPFDevelopers.Samples.ExampleViews.ThermometerExample" |
| 3 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 4 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 5 | + xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls" |
| 6 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 7 | + xmlns:local="clr-namespace:WPFDevelopers.Samples.ExampleViews" |
| 8 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 9 | + xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers" |
| 10 | + d:DesignHeight="450" |
| 11 | + d:DesignWidth="800" |
| 12 | + mc:Ignorable="d"> |
11 | 13 | <controls:CodeViewer>
|
12 | 14 |
|
13 |
| - <Border Background="{DynamicResource WD.BackgroundSolidColorBrush}" |
14 |
| - CornerRadius="12" |
15 |
| - Width="400" Height="400" |
16 |
| - Effect="{StaticResource WD.NormalShadowDepth}"> |
| 15 | + <Border |
| 16 | + Width="400" |
| 17 | + Height="400" |
| 18 | + Background="{DynamicResource WD.BackgroundSolidColorBrush}" |
| 19 | + CornerRadius="12" |
| 20 | + Effect="{StaticResource WD.NormalShadowDepth}"> |
17 | 21 | <Grid>
|
18 | 22 | <Grid.ColumnDefinitions>
|
19 |
| - <ColumnDefinition/> |
20 |
| - <ColumnDefinition/> |
| 23 | + <ColumnDefinition /> |
| 24 | + <ColumnDefinition /> |
21 | 25 | </Grid.ColumnDefinitions>
|
22 |
| - <Slider x:Name="PART_Slider" IsSnapToTickEnabled="True" |
23 |
| - Value="10" |
24 |
| - Minimum="-10" |
25 |
| - Maximum="40" |
26 |
| - Orientation="Vertical" |
27 |
| - Height="300"/> |
28 |
| - <Grid VerticalAlignment="Center" |
29 |
| - Margin="160,0,0,0"> |
30 |
| - <Path Fill="{DynamicResource WD.PrimaryMouseOverSolidColorBrush}" |
31 |
| - Stroke="{DynamicResource WD.PrimaryMouseOverSolidColorBrush}" |
32 |
| - StrokeThickness="1" Opacity=".6" |
33 |
| - Data="{Binding ElementName=PART_Thermometer, Path=CurrentGeometry,Mode=TwoWay}"/> |
34 |
| - <wd:Thermometer x:Name="PART_Thermometer" |
35 |
| - CurrentValue="{Binding ElementName=PART_Slider,Path=Value,Mode=TwoWay}"/> |
| 26 | + <Slider |
| 27 | + x:Name="PART_Slider" |
| 28 | + Height="300" |
| 29 | + IsSnapToTickEnabled="True" |
| 30 | + Maximum="40" |
| 31 | + Minimum="-10" |
| 32 | + Orientation="Vertical" |
| 33 | + Value="10" /> |
| 34 | + <Grid Margin="160,0,0,0" VerticalAlignment="Center"> |
| 35 | + <Path |
| 36 | + Data="{Binding ElementName=PART_Thermometer, Path=Geometry, Mode=TwoWay}" |
| 37 | + Fill="{DynamicResource WD.PrimaryMouseOverSolidColorBrush}" |
| 38 | + Opacity=".6" |
| 39 | + Stroke="{DynamicResource WD.PrimaryMouseOverSolidColorBrush}" |
| 40 | + StrokeThickness="1" /> |
| 41 | + <wd:Thermometer x:Name="PART_Thermometer" Value="{Binding ElementName=PART_Slider, Path=Value, Mode=TwoWay}" /> |
36 | 42 | </Grid>
|
37 |
| - <TextBlock Text="{Binding ElementName=PART_Thermometer,Path=CurrentValue,StringFormat={}{0}℃}" |
38 |
| - FontSize="24" Grid.Column="1" |
39 |
| - Foreground="{DynamicResource WD.PrimaryPressedSolidColorBrush}" FontFamily="Bahnschrift" |
40 |
| - HorizontalAlignment="Center" VerticalAlignment="Center"/> |
| 43 | + <TextBlock |
| 44 | + Grid.Column="1" |
| 45 | + HorizontalAlignment="Center" |
| 46 | + VerticalAlignment="Center" |
| 47 | + FontFamily="Bahnschrift" |
| 48 | + FontSize="24" |
| 49 | + Foreground="{DynamicResource WD.PrimaryPressedSolidColorBrush}" |
| 50 | + Text="{Binding ElementName=PART_Thermometer, Path=Value, StringFormat={}{0}℃}" /> |
41 | 51 | </Grid>
|
42 | 52 | </Border>
|
43 | 53 | <controls:CodeViewer.SourceCodes>
|
44 |
| - <controls:SourceCodeModel |
45 |
| - CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/ThermometerExample.xaml" |
46 |
| - CodeType="Xaml"/> |
47 |
| - <controls:SourceCodeModel |
48 |
| - CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/ThermometerExample.xaml.cs" |
49 |
| - CodeType="CSharp"/> |
| 54 | + <controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/ThermometerExample.xaml" CodeType="Xaml" /> |
| 55 | + <controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/ThermometerExample.xaml.cs" CodeType="CSharp" /> |
50 | 56 | </controls:CodeViewer.SourceCodes>
|
51 | 57 | </controls:CodeViewer>
|
52 | 58 | </UserControl>
|
0 commit comments