|
1 |
| -<UserControl x:Class="WPFDevelopers.Samples.ExampleViews.RulerControlExample" |
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:local="clr-namespace:WPFDevelopers.Samples.ExampleViews" |
7 |
| - xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers" |
8 |
| - xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls" |
9 |
| - mc:Ignorable="d" |
10 |
| - d:DesignHeight="450" d:DesignWidth="800"> |
| 1 | +<UserControl |
| 2 | + x:Class="WPFDevelopers.Samples.ExampleViews.RulerControlExample" |
| 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 | <Grid>
|
13 |
| - <Slider x:Name="PART_Slider" IsSnapToTickEnabled="True" |
14 |
| - Value="40" |
| 15 | + <Slider |
| 16 | + x:Name="PART_Slider" |
| 17 | + IsSnapToTickEnabled="True" |
| 18 | + Maximum="210" |
15 | 19 | Minimum="10"
|
16 |
| - Maximum="210"/> |
| 20 | + Value="40" /> |
| 21 | + <TextBlock |
| 22 | + Margin="0,20" |
| 23 | + HorizontalAlignment="Center" |
| 24 | + IsHitTestVisible="False" |
| 25 | + Text="{Binding ElementName=PART_Ruler, Path=Value}" /> |
| 26 | + |
17 | 27 | <UniformGrid Rows="3">
|
18 |
| - <Grid Background="{StaticResource WD.CircularDualSolidColorBrush}" Height="51" Margin="40,0"> |
19 |
| - <Path Stroke="{StaticResource WD.SuccessPressedSolidColorBrush}" StrokeThickness="1" Fill="{StaticResource WD.SuccessPressedSolidColorBrush}" |
20 |
| - Data="{Binding ElementName=PART_Ruler, Path=CurrentGeometry,Mode=TwoWay}" /> |
21 |
| - <wd:Ruler x:Name="PART_Ruler" Margin="40,0" Interval="20" StartValue="10" EndValue="210" |
22 |
| - CurrentValue="{Binding ElementName=PART_Slider,Path=Value,Mode=TwoWay}"/> |
| 28 | + <Grid |
| 29 | + Height="51" |
| 30 | + Margin="40,0" |
| 31 | + Background="{StaticResource WD.CircularDualSolidColorBrush}"> |
| 32 | + <Path |
| 33 | + Data="{Binding ElementName=PART_Ruler, Path=Geometry, Mode=TwoWay}" |
| 34 | + Fill="{StaticResource WD.SuccessPressedSolidColorBrush}" |
| 35 | + Stroke="{StaticResource WD.SuccessPressedSolidColorBrush}" |
| 36 | + StrokeThickness="1" /> |
| 37 | + <wd:Ruler |
| 38 | + x:Name="PART_Ruler" |
| 39 | + Margin="40,0" |
| 40 | + Interval="20" |
| 41 | + Maximum="210" |
| 42 | + Minimum="10" |
| 43 | + Value="{Binding ElementName=PART_Slider, Path=Value, Mode=TwoWay}" /> |
23 | 44 | </Grid>
|
24 |
| - <Grid Background="{StaticResource WD.DangerPressedSolidColorBrush}" Height="51" Margin="40,0"> |
25 |
| - <Path Stroke="{StaticResource WD.SuccessPressedSolidColorBrush}" StrokeThickness="1" Fill="{StaticResource WD.SuccessPressedSolidColorBrush}" |
26 |
| - Data="{Binding ElementName=PART_Ruler1, Path=CurrentGeometry,Mode=TwoWay}" /> |
27 |
| - <wd:Ruler x:Name="PART_Ruler1" Margin="40,0" Interval="20" StartValue="10" EndValue="210" |
28 |
| - CurrentValue="{Binding ElementName=PART_Slider,Path=Value,Mode=TwoWay}"/> |
| 45 | + <Grid |
| 46 | + Height="51" |
| 47 | + Margin="40,0" |
| 48 | + Background="{StaticResource WD.DangerPressedSolidColorBrush}"> |
| 49 | + <Path |
| 50 | + Data="{Binding ElementName=PART_Ruler1, Path=Geometry, Mode=TwoWay}" |
| 51 | + Fill="{StaticResource WD.SuccessPressedSolidColorBrush}" |
| 52 | + Stroke="{StaticResource WD.SuccessPressedSolidColorBrush}" |
| 53 | + StrokeThickness="1" /> |
| 54 | + <wd:Ruler |
| 55 | + x:Name="PART_Ruler1" |
| 56 | + Margin="40,0" |
| 57 | + Interval="20" |
| 58 | + Maximum="210" |
| 59 | + Minimum="10" |
| 60 | + Value="{Binding ElementName=PART_Slider, Path=Value, Mode=TwoWay}" /> |
29 | 61 | </Grid>
|
30 |
| - <Grid Background="{StaticResource WD.WarningPressedSolidColorBrush}" Height="51" Margin="40,0"> |
31 |
| - <Path Stroke="{StaticResource WD.SuccessPressedSolidColorBrush}" StrokeThickness="1" Fill="{StaticResource WD.SuccessPressedSolidColorBrush}" |
32 |
| - Data="{Binding ElementName=PART_Ruler2, Path=CurrentGeometry,Mode=TwoWay}" /> |
33 |
| - <wd:Ruler x:Name="PART_Ruler2" Margin="40,0" Interval="20" StartValue="10" EndValue="210" |
34 |
| - CurrentValue="{Binding ElementName=PART_Slider,Path=Value,Mode=TwoWay}"/> |
| 62 | + <Grid |
| 63 | + Height="51" |
| 64 | + Margin="40,0" |
| 65 | + Background="{StaticResource WD.WarningPressedSolidColorBrush}"> |
| 66 | + <Path |
| 67 | + Data="{Binding ElementName=PART_Ruler2, Path=Geometry, Mode=TwoWay}" |
| 68 | + Fill="{StaticResource WD.SuccessPressedSolidColorBrush}" |
| 69 | + Stroke="{StaticResource WD.SuccessPressedSolidColorBrush}" |
| 70 | + StrokeThickness="1" /> |
| 71 | + <wd:Ruler |
| 72 | + x:Name="PART_Ruler2" |
| 73 | + Margin="40,0" |
| 74 | + Interval="20" |
| 75 | + Maximum="210" |
| 76 | + Minimum="10" |
| 77 | + Value="{Binding ElementName=PART_Slider, Path=Value, Mode=TwoWay}" /> |
35 | 78 | </Grid>
|
36 | 79 | </UniformGrid>
|
37 | 80 | </Grid>
|
38 | 81 | <controls:CodeViewer.SourceCodes>
|
39 |
| - <controls:SourceCodeModel |
40 |
| - CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/RulerControlExample.xaml" |
41 |
| - CodeType="Xaml"/> |
42 |
| - <controls:SourceCodeModel |
43 |
| - CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/RulerControlExample.xaml.cs" |
44 |
| - CodeType="CSharp"/> |
| 82 | + <controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/RulerControlExample.xaml" CodeType="Xaml" /> |
| 83 | + <controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/RulerControlExample.xaml.cs" CodeType="CSharp" /> |
45 | 84 | </controls:CodeViewer.SourceCodes>
|
46 | 85 | </controls:CodeViewer>
|
47 | 86 | </UserControl>
|
0 commit comments