<?xml version="1.0" encoding="utf-8"?>
<ResourceDictionary
    xmlns="www.team-mediaportal.com/2008/mpf/directx"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    DependsOnStyleResources="Colors"
    >
  <Style x:Key="AnalogClockStyle" TargetType="{x:Type Control}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate x:Name="AnalogClockTemplate">
          <Grid Width="364" Height="364" x:Name="AnalogClockGrid">
            <!--Ellipse VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Fill="{ThemeResource AnalogClockBackgroundColor}" StrokeThickness="3">
              <Ellipse.Stroke>
                <LinearGradientBrush>
                  <GradientStop Color="{ThemeResource AnalogClockBorderGradientDarkColor}" Offset="0" />
                  <GradientStop Color="{ThemeResource AnalogClockBorderGradientLightColor}" Offset="1" />
                </LinearGradientBrush>
              </Ellipse.Stroke>
            </Ellipse-->
            <Image Source="TE_Clock.png" Stretch="Fill" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
            <Canvas Width="306" Height="306">
              <Canvas.Resources>
                <Model x:Key="TimeModel" Id="E821B1C8-0666-4339-8027-AA45A4F6F107"/>
              </Canvas.Resources>

              <!--Ellipse Width="4" Height="4" Fill="{ThemeResource AnalogClockHandColor}" Canvas.Top="24" Canvas.Left="23" />

              <Rectangle Canvas.Top="2.5" Canvas.Left="24" Fill="{ThemeResource AnalogClockTickMarkColor}" Width="2" Height="4">
                <Rectangle.RenderTransform>
                  <RotateTransform CenterX="1" CenterY="24" Angle="0" />
                </Rectangle.RenderTransform>
              </Rectangle>

              <Rectangle Canvas.Top="2.5" Canvas.Left="24.5" Fill="{ThemeResource AnalogClockTickMarkColor}" Width="1" Height="3">
                <Rectangle.RenderTransform>
                  <RotateTransform CenterX="1" CenterY="24" Angle="30" />
                </Rectangle.RenderTransform>
              </Rectangle>

              <Rectangle Canvas.Top="2.5" Canvas.Left="24.5" Fill="{ThemeResource AnalogClockTickMarkColor}" Width="1" Height="3">
                <Rectangle.RenderTransform>
                  <RotateTransform CenterX="1" CenterY="24" Angle="60" />
                </Rectangle.RenderTransform>
              </Rectangle>

              <Rectangle Canvas.Top="2.5" Canvas.Left="24" Fill="{ThemeResource AnalogClockTickMarkColor}" Width="2" Height="4">
                <Rectangle.RenderTransform>
                  <RotateTransform CenterX="1" CenterY="24" Angle="90" />
                </Rectangle.RenderTransform>
              </Rectangle>

              <Rectangle Canvas.Top="2.5" Canvas.Left="24.5" Fill="{ThemeResource AnalogClockTickMarkColor}" Width="1" Height="3">
                <Rectangle.RenderTransform>
                  <RotateTransform CenterX="1" CenterY="24" Angle="120" />
                </Rectangle.RenderTransform>
              </Rectangle>

              <Rectangle Canvas.Top="2.5" Canvas.Left="24.5" Fill="{ThemeResource AnalogClockTickMarkColor}" Width="1" Height="3">
                <Rectangle.RenderTransform>
                  <RotateTransform CenterX="1" CenterY="24" Angle="150" />
                </Rectangle.RenderTransform>
              </Rectangle>

              <Rectangle Canvas.Top="2.5" Canvas.Left="24" Fill="{ThemeResource AnalogClockTickMarkColor}" Width="2" Height="4">
                <Rectangle.RenderTransform>
                  <RotateTransform CenterX="1" CenterY="24" Angle="180" />
                </Rectangle.RenderTransform>
              </Rectangle>

              <Rectangle Canvas.Top="2.5" Canvas.Left="24.5" Fill="{ThemeResource AnalogClockTickMarkColor}" Width="1" Height="3">
                <Rectangle.RenderTransform>
                  <RotateTransform CenterX="1" CenterY="24" Angle="210" />
                </Rectangle.RenderTransform>
              </Rectangle>

              <Rectangle Canvas.Top="2.5" Canvas.Left="24.5" Fill="{ThemeResource AnalogClockTickMarkColor}" Width="1" Height="3">
                <Rectangle.RenderTransform>
                  <RotateTransform CenterX="1" CenterY="24" Angle="240" />
                </Rectangle.RenderTransform>
              </Rectangle>

              <Rectangle Canvas.Top="2.5" Canvas.Left="24" Fill="{ThemeResource AnalogClockTickMarkColor}" Width="2" Height="4">
                <Rectangle.RenderTransform>
                  <RotateTransform CenterX="1" CenterY="24" Angle="270" />
                </Rectangle.RenderTransform>
              </Rectangle>

              <Rectangle Canvas.Top="2.5" Canvas.Left="24.5" Fill="{ThemeResource AnalogClockTickMarkColor}" Width="1" Height="3">
                <Rectangle.RenderTransform>
                  <RotateTransform CenterX="1" CenterY="24" Angle="300" />
                </Rectangle.RenderTransform>
              </Rectangle>

              <Rectangle Canvas.Top="2.5" Canvas.Left="24.5" Fill="{ThemeResource AnalogClockTickMarkColor}" Width="1" Height="3">
                <Rectangle.RenderTransform>
                  <RotateTransform CenterX="1" CenterY="24" Angle="330" />
                </Rectangle.RenderTransform>
              </Rectangle-->


              <Rectangle x:Name="HourHand" Canvas.Top="63" Canvas.Left="150" RadiusX="4" RadiusY="4" Fill="{ThemeResource AnalogClockHandColor}" Width="8" Height="90">
                <Rectangle.RenderTransform>
                  <RotateTransform x:Name="HourHand2" CenterX="6" CenterY="90" Angle="{Binding Source={StaticResource TimeModel},Path=HourAngle}"/>
                </Rectangle.RenderTransform>
              </Rectangle>

              <Rectangle x:Name="MinuteHand" Canvas.Top="28" Canvas.Left="153" RadiusX="2" RadiusY="2" Fill="{ThemeResource AnalogClockHandColor}" Width="4" Height="127">
                <Rectangle.RenderTransform>
                  <RotateTransform CenterX="3" CenterY="127" Angle="{Binding Source={StaticResource TimeModel},Path=MinuteAngle}"/>
                </Rectangle.RenderTransform>
              </Rectangle>
            </Canvas>
          </Grid>

        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>