8
8
<converter : DividerValueConverter x : Key =" DividerValueConverter" />
9
9
10
10
<Style TargetType =" wpf:AnalogClockFace" >
11
- <Setter Property =" SelectedHour" Value =" 400.5" />
11
+ <Setter Property =" Background" Value =" Transparent" />
12
+ <Setter Property =" FontSize" Value =" 16" />
13
+ <Setter Property =" FontStretch" Value =" UltraExpanded" />
14
+ <Setter Property =" FontWeight" Value =" UltraLight" />
15
+ <Setter Property =" Foreground" Value =" {StaticResource ApplicationWhiteBrush}" />
16
+ <Setter Property =" SelectedHour" Value =" 3.0042" />
12
17
<Setter Property =" HourHandElement" >
13
18
<Setter .Value>
14
- <Line X1 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace }, Path=Radius }"
15
- Y1 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace }, Path=Radius }"
16
- X2 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace }, Path=Radius }"
17
- Y2 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace }, Path=Radius , Converter={StaticResource DividerValueConverter}, ConverterParameter=3 }"
19
+ <Line X1 =" {Binding RelativeSource={RelativeSource AncestorType=Canvas }, Path=ActualWidth, Converter={StaticResource DividerValueConverter}, ConverterParameter=2 }"
20
+ Y1 =" {Binding RelativeSource={RelativeSource AncestorType=Canvas }, Path=ActualWidth, Converter={StaticResource DividerValueConverter}, ConverterParameter=2 }"
21
+ X2 =" {Binding RelativeSource={RelativeSource AncestorType=Canvas }, Path=ActualWidth, Converter={StaticResource DividerValueConverter}, ConverterParameter=2 }"
22
+ Y2 =" {Binding RelativeSource={RelativeSource AncestorType=Canvas }, Path=ActualWidth , Converter={StaticResource DividerValueConverter}, ConverterParameter=12 }"
18
23
Stroke =" {StaticResource ApplicationWhiteBrush}"
19
24
StrokeThickness =" 3" />
20
25
</Setter .Value>
21
26
</Setter >
22
27
<Setter Property =" MinuteHandElement" >
23
28
<Setter .Value>
24
- <Line X1 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace}, Path=Radius }"
25
- Y1 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace}, Path=Radius }"
26
- X2 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace}, Path=Radius }"
27
- Y2 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace}, Path=Radius , Converter={StaticResource DividerValueConverter}, ConverterParameter=16 }"
29
+ <Line X1 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace}, Path=ActualWidth, Converter={StaticResource DividerValueConverter}, ConverterParameter=2 }"
30
+ Y1 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace}, Path=ActualWidth, Converter={StaticResource DividerValueConverter}, ConverterParameter=2 }"
31
+ X2 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace}, Path=ActualWidth, Converter={StaticResource DividerValueConverter}, ConverterParameter=2 }"
32
+ Y2 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace}, Path=ActualWidth , Converter={StaticResource DividerValueConverter}, ConverterParameter=28 }"
28
33
Stroke =" {StaticResource ApplicationWhiteBrush}"
29
34
StrokeThickness =" 3" />
30
35
</Setter .Value>
31
36
</Setter >
32
37
<Setter Property =" SecondHandElement" >
33
38
<Setter .Value>
34
- <Line X1 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace }, Path=Radius }"
35
- Y1 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace }, Path=Radius }"
36
- X2 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace }, Path=Radius }"
37
- Y2 =" {Binding RelativeSource={RelativeSource AncestorType=wpf:AnalogClockFace }, Path=Radius , Converter={StaticResource DividerValueConverter}, ConverterParameter=16 }"
39
+ <Line X1 =" {Binding RelativeSource={RelativeSource AncestorType=Canvas }, Path=ActualWidth }"
40
+ Y1 =" {Binding RelativeSource={RelativeSource AncestorType=Canvas }, Path=ActualWidth, Converter={StaticResource DividerValueConverter}, ConverterParameter=2 }"
41
+ X2 =" {Binding RelativeSource={RelativeSource AncestorType=Canvas }, Path=ActualWidth, Converter={StaticResource DividerValueConverter}, ConverterParameter=2 }"
42
+ Y2 =" {Binding RelativeSource={RelativeSource AncestorType=Canvas }, Path=ActualWidth , Converter={StaticResource DividerValueConverter}, ConverterParameter=28 }"
38
43
Stroke =" {StaticResource ApplicationWhiteBrush}"
39
44
StrokeThickness =" 1" />
40
45
</Setter .Value>
46
51
</Setter >
47
52
<Setter Property =" FiveMinuteIntervalElement" >
48
53
<Setter .Value>
49
- <Ellipse Height =" 4" Width =" 4" Fill =" {StaticResource ApplicationWhiteBrush}" />
54
+ <Rectangle Height =" 8" Width =" 2" Fill =" {StaticResource ApplicationWhiteBrush}"
55
+ wpf:AnalogClockFace.IsCenterElementOnCircumferenceEnabled=" False" />
50
56
</Setter .Value>
51
57
</Setter >
52
58
<Setter Property =" MinuteIntervalElement" >
53
59
<Setter .Value>
54
60
<Ellipse Height =" 2" Width =" 2" Fill =" {StaticResource ApplicationWhiteBrush}" />
55
61
</Setter .Value>
56
62
</Setter >
63
+ <Setter Property =" Template" >
64
+ <Setter .Value>
65
+ <ControlTemplate TargetType =" wpf:AnalogClockFace" >
66
+ <Border Background =" {TemplateBinding Background}"
67
+ BorderBrush =" {TemplateBinding BorderBrush}"
68
+ BorderThickness =" {TemplateBinding BorderThickness}" >
69
+ <Border x : Name =" PART_ElementHost" />
70
+ </Border >
71
+ </ControlTemplate >
72
+ </Setter .Value>
73
+ </Setter >
57
74
</Style >
58
75
59
76
</ResourceDictionary >
0 commit comments