-
Notifications
You must be signed in to change notification settings - Fork 298
Expand file tree
/
Copy pathDialExample.xaml
More file actions
63 lines (63 loc) · 2.89 KB
/
DialExample.xaml
File metadata and controls
63 lines (63 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<UserControl
x:Class="WPFDevelopers.Samples.ExampleViews.DialExample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:WPFDevelopers.Samples.ExampleViews"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<controls:CodeViewer Header="{Binding NavigateMenuItem.Name}">
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<StackPanel>
<TextBlock HorizontalAlignment="Center" Text="{Binding ElementName=MyDial, Path=Value, StringFormat='{}{0:0}'}" />
<wd:Dial
x:Name="MyDial"
Width="200"
Height="200"
Margin="10"
Value="{Binding ElementName=MySlider, Path=Value}" />
<Slider
Name="MySlider"
Width="200"
Margin="0,0,0,20"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
wd:ElementHelper.CornerRadius="4"
IsSnapToTickEnabled="True"
Maximum="100"
Minimum="0" />
</StackPanel>
<StackPanel VerticalAlignment="Bottom">
<TextBlock HorizontalAlignment="Center" Text="{Binding ElementName=MyDial1, Path=Value}" />
<wd:Dial
x:Name="MyDial1"
Width="200"
Height="200"
Margin="10"
Background="WhiteSmoke"
BorderBrush="DodgerBlue"
BorderThickness="5"
Maximum="80"
Minimum="50"
Value="{Binding ElementName=MySlider2, Path=Value}" />
<Slider
Name="MySlider2"
Width="200"
Margin="0,0,0,20"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
wd:ElementHelper.CornerRadius="4"
Maximum="80"
Minimum="50" />
</StackPanel>
</WrapPanel>
<controls:CodeViewer.SourceCodes>
<controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/DialExample.xaml" CodeType="Xaml" />
<controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/DialExample.xaml.cs" CodeType="CSharp" />
</controls:CodeViewer.SourceCodes>
</controls:CodeViewer>
</UserControl>