<UserControl x:Class="CompassVO.Themes.compass_orienteering.compass_orienteering_UI"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" mc:Ignorable="d"
             FontFamily="{StaticResource PhoneFontFamilyNormal}"
             FontSize="{StaticResource PhoneFontSizeNormal}"
             Foreground="{StaticResource PhoneForegroundBrush}"
             d:DesignHeight="800"
             d:DesignWidth="480"
             DataContext="{Binding Main, Source={StaticResource Locator}}">

  <Grid x:Name="LayoutRoot" Background="Transparent">
    <Image Source="images/compass_orienteering_back.png"
               CacheMode="BitmapCache" />

    <Grid HorizontalAlignment="Center" VerticalAlignment="Top" Width="410" Height="410" Margin="0,300,0,0.3" Opacity="1">
      <Image Height="410"
                   x:Name="imgDial"
                   Stretch="None"
                   Width="410"
                   Source="images\compass_orienteering_dial.png"
                   Margin="0"
                   VerticalAlignment="Center"
                   HorizontalAlignment="Center"
                   CacheMode="BitmapCache">
        <Image.RenderTransform>
          <RotateTransform Angle="{Binding DialAngle, Mode=OneWay}"
                                     CenterX="205"
                                     CenterY="205" />
        </Image.RenderTransform>
      </Image>
      <Image Height="410"
                   x:Name="imgDialRotate"
                   Stretch="None"
                   Width="410"
                   Source="images\compass_orienteering_rotate.png"
                   Margin="0"
                   VerticalAlignment="Center"
                   HorizontalAlignment="Center"
                   Visibility="{Binding IsDialEdit, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"
                   CacheMode="BitmapCache">
      </Image>
      <Image Height="302"
        		x:Name="compassNeedle"
        		Stretch="None"
        		Width="38"
        		Source="images\compass_orienteering_needle.png" Margin="0" VerticalAlignment="Center" HorizontalAlignment="Center"
                   CacheMode="BitmapCache">
        <Image.RenderTransform>
          <RotateTransform x:Name="needleRotation"
                                     Angle="0"
        				CenterX="19"
        				CenterY="151" />
        </Image.RenderTransform>
      </Image>
    </Grid>

    <Grid Width="100"
              Height="72"
              Visibility="{Binding IsDialEditManipulation, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"
              VerticalAlignment="Top"
              HorizontalAlignment="Center"
              Margin="0, 200, 0, 0">
      <Border Background="DarkRed">
        <Grid>
          <TextBlock HorizontalAlignment="Center"
                               VerticalAlignment="Center"
                               Foreground="White"
                               FontWeight="Bold"
                               FontSize="36"
                               Text="{Binding DialAngleHeading, Mode=OneWay, StringFormat='0'}" />
        </Grid>
      </Border>
    </Grid>
  </Grid>
</UserControl>