1: <Window x:Class="WPFClock.Views.Clock"
2: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4: xmlns:Converters="clr-namespace:WPFClock.Converters"
5: Height="350" Width="350" Title="MVVM Analog Clock">
6:
7: <Window.Resources>
8: <Converters:AngleConverter x:Key="angleConverter"/>
9: </Window.Resources>
10:
11: <StackPanel>
12: <TextBlock Text="{Binding Path=CurrentDateTime}" HorizontalAlignment="Center"/>
13:
14: <Grid x:Name="LayoutRoot" Width="300" Height="300" Background="White">
15: <Ellipse Margin="10">
16: <Ellipse.Fill>
17: <RadialGradientBrush>
18: <GradientStop Color="#FFB1B1B1"/>
19: <GradientStop Color="#FF989898" Offset="0.953"/>
20: <GradientStop Color="White" Offset="0.909"/>
21: <GradientStop Color="#FF121212" Offset="1"/>
22: <GradientStop Color="#FF9B9B9B" Offset="0.884"/>
23: </RadialGradientBrush>
24: </Ellipse.Fill>
25: </Ellipse>
26:
27: <TextBlock Margin="74.333,0,74.667,154" Text="12" TextWrapping="Wrap" FontSize="96"
28: FontWeight="Bold" TextAlignment="Center" FontFamily="Nightclub BTN Cn"/>
29: <TextBlock Margin="107,195.999,110.333,27.65" FontSize="64"
30: FontWeight="Bold" Text="6" TextAlignment="Center" TextWrapping="Wrap" Foreground="#FFC90000" FontFamily="Nightclub BTN Cn"/>
31: <TextBlock Margin="0,80,30,117.001" FontSize="96"
32: FontWeight="Bold" Text="3" TextAlignment="Center" TextWrapping="Wrap" HorizontalAlignment="Right" Width="72.667" Foreground="#FF000BFF" FontFamily="Nightclub BTN Cn"/>
33: <TextBlock Margin="-6.667,93.333,0,94.668" FontSize="96"
34: FontWeight="Bold" Text="9" TextAlignment="Center" TextWrapping="Wrap" HorizontalAlignment="Left" Width="128" Foreground="#FF004D10" FontFamily="Nightclub BTN Cn"/>
35:
36: <Rectangle Margin="148,0,148,150" x:Name="rectangleSecond" Height="120" VerticalAlignment="Bottom" RadiusX="1" RadiusY="1" Fill="#FF2E2E2E">
37: <Rectangle.RenderTransform>
38: <RotateTransform CenterX="2" CenterY="120"
39: Angle="{Binding Path=CurrentDateTime, Converter={StaticResource angleConverter}, ConverterParameter=S}" />
40: </Rectangle.RenderTransform>
41: </Rectangle>
42:
43: <Rectangle Margin="148,49,148,151" x:Name="rectangleMinute" RadiusX="1" RadiusY="1" Fill="#FF2E2E2E">
44: <Rectangle.RenderTransform>
45: <RotateTransform CenterX="2" CenterY="100"
46: Angle="{Binding Path=CurrentDateTime, Converter={StaticResource angleConverter}, ConverterParameter=M}" />
47: </Rectangle.RenderTransform>
48: </Rectangle>
49:
50: <Rectangle Margin="148,80,148,150" x:Name="rectangleHour" RadiusX="1" RadiusY="1" Fill="#FF2E2E2E">
51: <Rectangle.RenderTransform>
52: <RotateTransform CenterX="2" CenterY="70"
53: Angle="{Binding Path=CurrentDateTime, Converter={StaticResource angleConverter}, ConverterParameter=H}" />
54: </Rectangle.RenderTransform>
55: </Rectangle>
56:
57: <Ellipse Margin="145" Fill="#FF2E2E2E"></Ellipse>
58: <Ellipse Margin="149" Fill="White"></Ellipse>
59:
60: <Path Stretch="Fill" Margin="20,20,20,0"
61: Data="M260,130 C260,58.202983 201.79702,0 130,0 58.202983,0 0,58.202983 0,130 43.777778,130 72.635599,95.461382
62: 130.66667,97.333343 192.66667,99.333333 217.11111,130 260,130 z" VerticalAlignment="Top" Height="130">
63: <Path.Fill>
64: <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
65: <GradientStop Color="#2FFFFFFF" Offset="1"/>
66: <GradientStop Color="White"/>
67: </LinearGradientBrush>
68: </Path.Fill>
69: </Path>
70: </Grid>
71: </StackPanel>
72: </Window>