<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="Olympics.MedalsMap" mc:Ignorable="d" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" xmlns:local="clr-namespace:Olympics" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
    <UserControl.Resources>
        <DataTemplate x:Name="CountryTemplate">
        	<local:MapCountryView Info="{Binding}" />
        </DataTemplate>
		<ControlTemplate TargetType="ScrollBar" x:Key="MapScrollBar">
        <Grid x:Name="Root">
            <Grid.Resources>
                <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
                    <Grid x:Name="Root" Background="Transparent" Width="6" />
                </ControlTemplate>
                <ControlTemplate x:Key="VerticalIncrementTemplate" TargetType="RepeatButton">
                    <Grid x:Name="Root" Background="#00000000">
                        <vsm:VisualStateManager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CommonStates">
                                <vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualTransition GeneratedDuration="0:0:0.2" To="MouseOver" />
                                </vsm:VisualStateGroup.Transitions>
                                <vsm:VisualState x:Name="Normal" />
                                <vsm:VisualState x:Name="MouseOver">
                                    <Storyboard />
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Disabled">
                                    <Storyboard />
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                            <vsm:VisualStateGroup x:Name="FocusStates">
                                <vsm:VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <vsm:Visibility>Visible</vsm:Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Unfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <vsm:Visibility>Collapsed</vsm:Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                        </vsm:VisualStateManager.VisualStateGroups>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="25*" />
                            <ColumnDefinition Width="50*" />
                            <ColumnDefinition Width="25*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="35*" />
                            <RowDefinition Height="30*" />
                            <RowDefinition Height="35*" />
                        </Grid.RowDefinitions>
                        <Rectangle x:Name="FocusVisual" IsHitTestVisible="false" Opacity="0" Grid.ColumnSpan="3" Grid.RowSpan="3" Fill="#00000000" Stroke="#666666" StrokeDashArray=".2 5" StrokeDashCap="Round" />
                        <Rectangle HorizontalAlignment="Stretch" Margin="-3,0,-3,0" VerticalAlignment="Stretch" RadiusX="2" RadiusY="2" Stroke="#FFD7AB13" Grid.Column="1" Grid.RowSpan="3" StrokeThickness="2">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.0270000007003546,0.497000008821487" StartPoint="0.955999970436096,0.497000008821487">
                                    <GradientStop Color="#FFDA924C" Offset="0.688" />
                                    <GradientStop Color="#FFE8BD74" Offset="0.638" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle Height="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" Grid.Row="1" RadiusX="0" RadiusY="0" Fill="#FFFFFFFF" Stroke="#FF6A1600" Margin="1,0,1,0" />
                        <Rectangle RadiusX="0" RadiusY="0" Fill="#FFFFFFFF" Stroke="#FF6A1600" Width="2" Grid.Column="1" Grid.RowSpan="1" Grid.Row="1" Margin="0,-1.5,0,-1.5" />
                        <Rectangle Height="2.632" HorizontalAlignment="Stretch" Margin="1,-0.465000003576279,1,0" VerticalAlignment="Top" RadiusX="0" RadiusY="0" Grid.Column="1" Grid.Row="0" d:LayoutOverrides="Height">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.00800000037997961,0.531000018119812" StartPoint="0.984000027179718,0.561999976634979">
                                    <GradientStop Color="#FFE7BC74" Offset="0.746" />
                                    <GradientStop Color="#FFD9914C" Offset="0.826" />
                                    <GradientStop Color="#FFE7BC74" Offset="0" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                    </Grid>
                </ControlTemplate>
                <ControlTemplate x:Key="VerticalDecrementTemplate" TargetType="RepeatButton">
                    <Grid x:Name="Root" Background="#00000000">
                        <vsm:VisualStateManager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CommonStates">
                                <vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualTransition GeneratedDuration="0:0:0.2" To="MouseOver" />
                                </vsm:VisualStateGroup.Transitions>
                                <vsm:VisualState x:Name="Normal" />
                                <vsm:VisualState x:Name="MouseOver">
                                    <Storyboard />
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Disabled">
                                    <Storyboard />
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                            <vsm:VisualStateGroup x:Name="FocusStates">
                                <vsm:VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <vsm:Visibility>Visible</vsm:Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Unfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <vsm:Visibility>Collapsed</vsm:Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                        </vsm:VisualStateManager.VisualStateGroups>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="25*" />
                            <ColumnDefinition Width="50*" />
                            <ColumnDefinition Width="25*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="35*" />
                            <RowDefinition Height="30*" />
                            <RowDefinition Height="35*" />
                        </Grid.RowDefinitions>
                        <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.ColumnSpan="3" Grid.RowSpan="3" RadiusX="2" RadiusY="2" Stroke="#FFD7AB13" Grid.Row="0" Margin="2,0,2,0" StrokeThickness="2">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.0270000007003546,0.497000008821487" StartPoint="0.955999970436096,0.497000008821487">
                                    <GradientStop Color="#FFDC944C" Offset="0.741" />
                                    <GradientStop Color="#FFEABF74" Offset="0.683" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle x:Name="FocusVisual" IsHitTestVisible="false" Opacity="0" Grid.ColumnSpan="3" Grid.RowSpan="3" Fill="#00000000" Stroke="#666666" StrokeDashArray=".2 5" StrokeDashCap="Round" Margin="0,0,0,1.35099995136261" />
                        <Rectangle Height="2" HorizontalAlignment="Stretch" Margin="1,1.18099999427795,1,0" VerticalAlignment="Top" RadiusX="0" RadiusY="0" Fill="#FFFFFFFF" Stroke="#FF6A1600" Grid.Column="1" Grid.Row="1" />
                        <Rectangle Height="2.435" HorizontalAlignment="Left" Margin="1,0,0,0" VerticalAlignment="Bottom" Width="8" Grid.Column="1" Grid.Row="2" RadiusX="0" RadiusY="0" d:LayoutOverrides="Height">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.00800000037997961,0.531000018119812" StartPoint="0.984000027179718,0.561999976634979">
                                    <GradientStop Color="#FFE8BD74" Offset="0.723" />
                                    <GradientStop Color="#FFDA924C" Offset="0.786" />
                                    <GradientStop Color="#FFE8BD74" Offset="0" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                    </Grid>
                </ControlTemplate>
                <ControlTemplate x:Key="VerticalThumbTemplate" TargetType="Thumb">
                    <Grid>
                        <Grid.Resources>
                            <SolidColorBrush x:Key="Background" Color="#FF003255" />
                            <Color x:Key="LinearBevelLightStartColor">#FCFFFFFF</Color>
                            <Color x:Key="LinearBevelLightEndColor">#F4FFFFFF</Color>
                            <Color x:Key="LinearBevelDarkStartColor">#E0FFFFFF</Color>
                            <Color x:Key="LinearBevelDarkEndColor">#B2FFFFFF</Color>
                            <Color x:Key="HoverLinearBevelLightStartColor">#FCFFFFFF</Color>
                            <Color x:Key="HoverLinearBevelLightEndColor">#EAFFFFFF</Color>
                            <Color x:Key="HoverLinearBevelDarkStartColor">#D8FFFFFF</Color>
                            <Color x:Key="HoverLinearBevelDarkEndColor">#4CFFFFFF</Color>
                        </Grid.Resources>
                        <vsm:VisualStateManager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CommonStates">
                                <vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
                                </vsm:VisualStateGroup.Transitions>
                                <vsm:VisualState x:Name="Normal" />
                                <vsm:VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="00:00:00" Value="{StaticResource HoverLinearBevelLightEndColor}" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="00:00:00" Value="{StaticResource HoverLinearBevelLightEndColor}" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="00:00:00" Value="{StaticResource HoverLinearBevelDarkStartColor}" />
                                        </ColorAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                            <SplineColorKeyFrame KeyTime="00:00:00" Value="{StaticResource HoverLinearBevelDarkEndColor}" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.6" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                        </vsm:VisualStateManager.VisualStateGroups>
                        <Grid x:Name="ThumbVisual">
                            <Rectangle x:Name="Background" RadiusX="3" RadiusY="3" Fill="#FF6A1600" />
                            <Rectangle x:Name="rectangle" StrokeThickness="1" RadiusX="2.5" RadiusY="2.5" Stroke="#FFA56320" Opacity="0.7">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                        <GradientStop Color="{StaticResource LinearBevelLightStartColor}" Offset="0" x:Name="LinearBevelLightStart" />
                                        <GradientStop Color="{StaticResource LinearBevelLightEndColor}" Offset="0.35" x:Name="LinearBevelLightEnd" />
                                        <GradientStop Color="{StaticResource LinearBevelDarkStartColor}" Offset="0.35" x:Name="LinearBevelDarkStart" />
                                        <GradientStop Color="{StaticResource LinearBevelDarkEndColor}" Offset="1" x:Name="LinearBevelDarkEnd" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Rectangle Fill="#00000000" Stroke="White" StrokeThickness="1" RadiusX="1.5" RadiusY="1.5" Margin="1,1,1,1" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Grid.Resources>
            <vsm:VisualStateManager.VisualStateGroups>
                <vsm:VisualStateGroup x:Name="CommonStates">
                    <vsm:VisualState x:Name="Normal" />
                    <vsm:VisualState x:Name="MouseOver" />
                    <vsm:VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </vsm:VisualState>
                </vsm:VisualStateGroup>
            </vsm:VisualStateManager.VisualStateGroups>
            <Grid x:Name="HorizontalRoot" Visibility="Collapsed">
                <RepeatButton x:Name="HorizontalSmallDecrease" />
                <RepeatButton x:Name="HorizontalLargeDecrease" />
                <Thumb x:Name="HorizontalThumb" />
                <RepeatButton x:Name="HorizontalLargeIncrease" />
                <RepeatButton x:Name="HorizontalSmallIncrease" />
            </Grid>
            <Grid x:Name="VerticalRoot" Visibility="Collapsed" Margin="0,-0.166999995708466,0,0.166999995708466" Width="20">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Rectangle Grid.ColumnSpan="2" Grid.RowSpan="5" Stroke="#FFD7AB13" RadiusX="1" RadiusY="1" Width="12" StrokeThickness="2">
                    <Rectangle.Fill>
                        <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                            <GradientStop Color="#FFDB934C" Offset="0.246" />
                            <GradientStop Color="#FFE9BE74" Offset="0.308" />
                            <GradientStop Color="#FFE9BE74" Offset="1" />
                        </LinearGradientBrush>
                    </Rectangle.Fill>
                </Rectangle>
                <RepeatButton Height="14" x:Name="VerticalSmallDecrease" IsTabStop="False" Template="{StaticResource VerticalDecrementTemplate}" Grid.ColumnSpan="2" Grid.Row="0" Interval="50" />
                <RepeatButton Height="0" x:Name="VerticalLargeDecrease" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.ColumnSpan="2" Grid.Row="1" Interval="50" Margin="0,0,0,0" />
                <Thumb Height="20" MinHeight="10" x:Name="VerticalThumb" Template="{StaticResource VerticalThumbTemplate}" Grid.ColumnSpan="2" Grid.Row="2" />
                <RepeatButton x:Name="VerticalLargeIncrease" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.ColumnSpan="2" Grid.Row="3" Interval="50" />
                <RepeatButton Height="14" x:Name="VerticalSmallIncrease" IsTabStop="False" Template="{StaticResource VerticalIncrementTemplate}" Grid.ColumnSpan="2" Grid.Row="4" Interval="50" Margin="0,0,0,-10" VerticalAlignment="Bottom" />
            </Grid>
        </Grid>
    </ControlTemplate>
        <ControlTemplate x:Key="C1MapToolsLayerControlTemplate1" TargetType="c1:C1MapToolsLayer">
			<Grid>
				<Grid>
					<Grid.RowDefinitions>
						<RowDefinition Height="Auto" />
						<RowDefinition Height="*" MaxHeight="200" />
						<RowDefinition Height="Auto" />
					</Grid.RowDefinitions>
					<!-- Pan tool -->
								<Grid Grid.Row="0" Width="50" Height="50" Margin="20,20,0,0" HorizontalAlignment="Left" VerticalAlignment="Top">
                            <Ellipse Fill="#FFA04402" Margin="1" Stroke="#FFD4A500" StrokeThickness="2" />
                            <Ellipse Stroke="#FFA04402" StrokeThickness="1" x:Name="Pan" Visibility="Visible" Opacity="0.1">
                                <Ellipse.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#B2FFFFFF" Offset="1" />
                                        <GradientStop Color="#E0FFFFFF" Offset="0.35" />
                                        <GradientStop Color="#FCFFFFFF" />
                                        <GradientStop Color="#F4FFFFFF" Offset="0.35" />
                                    </LinearGradientBrush>
                                </Ellipse.Fill>
                            </Ellipse>

                            <Grid IsHitTestVisible="False">
                                <Grid x:Name="CurvedBevelScale">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="7*" />
                                        <RowDefinition Height="3*" />
                                    </Grid.RowDefinitions>
                                    <Path Margin="0.433999985456467,0,0.43299999833107,0" x:Name="CurvedBevel" Stretch="Fill" Data="M24.566339,0 C36.905373,0 47.156551,8.9391928 49.133442,20.70577 C41.785328,29.814631 34.379581,35 24.566339,35 C14.751894,33.678825 7.3455315,29.764328 0,20.698179 C1.9804963,8.9353828 12.229933,0 24.566339,0 z">
                                        <Path.Fill>
                                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                <GradientStop Color="#B3FFFFFF" Offset="0" />
                                                <GradientStop Color="#3CFFFFFF" Offset="1" />
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                    </Path>
                                </Grid>
                                <Path Height="8" Margin="21.5,6,0,0" x:Name="north" VerticalAlignment="Top" Width="7" Stretch="Fill" Data="M15.236297,22.641129 L20.163666,17.71376 L24.999046,22.641256 z" Fill="#FF6A1600" HorizontalAlignment="Left" />
                                <Path Height="8" Width="7" Stretch="Fill" Data="M15.236297,22.641129 L20.163666,17.71376 L24.999046,22.641256 z" HorizontalAlignment="Left" Margin="36,21,0,0" x:Name="east" RenderTransformOrigin="0.5,0.5" Fill="#FF6A1600" VerticalAlignment="Top">
                                    <Path.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform />
                                            <SkewTransform />
                                            <RotateTransform Angle="90" />
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </Path.RenderTransform>
                                </Path>
                                <Path Height="8" Width="7" Stretch="Fill" Data="M15.236297,22.641129 L20.163666,17.71376 L24.999046,22.641256 z" RenderTransformOrigin="0.5,0.5" Margin="21.5,36,0,0" x:Name="south" VerticalAlignment="Top" Fill="#FF6A1600" HorizontalAlignment="Left">
                                    <Path.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform />
                                            <SkewTransform />
                                            <RotateTransform Angle="180" />
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </Path.RenderTransform>
                                </Path>
                                <Path Height="8" Width="7" Stretch="Fill" Data="M15.236297,22.641129 L20.163666,17.71376 L24.999046,22.641256 z" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" Margin="7,21,0,0" x:Name="west" Fill="#FF6A1600" VerticalAlignment="Top">
                                    <Path.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform />
                                            <SkewTransform />
                                            <RotateTransform Angle="270" />
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </Path.RenderTransform>
                                </Path>
                                <Ellipse Height="12" Width="12" x:Name="PanMarker" Visibility="Collapsed">
                                    <Ellipse.Fill>
                                        <RadialGradientBrush>
                                            <GradientStop Color="#B2426278" Offset="0" />
                                            <GradientStop Color="#00678FAC" Offset="1" />
                                        </RadialGradientBrush>
                                    </Ellipse.Fill>
                                </Ellipse>
                            </Grid>
                        </Grid>

                        <!-- Zoom tool -->
									<ScrollBar Grid.Row="1" Name="Zoom" Minimum="0" Maximum="20" SmallChange="1" LargeChange="1" Orientation="Vertical" Template="{StaticResource MapScrollBar}" Margin="34 20 0 5" Width="20" HorizontalAlignment="Left" VerticalAlignment="Stretch" RenderTransformOrigin="0.5,0.5">
                            <ScrollBar.RenderTransform>
                                <RotateTransform Angle="180" />
                            </ScrollBar.RenderTransform>
                        </ScrollBar>
                    </Grid>

				<!-- Scales -->
				<Grid Height="35" Width="212" Margin="0,0,15,5" HorizontalAlignment="Right" VerticalAlignment="Bottom">
					<Grid.RowDefinitions>
						<RowDefinition />
						<RowDefinition />
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="2*" />
						<ColumnDefinition Width="8*" />
					</Grid.ColumnDefinitions>
					<Rectangle RadiusX="2" RadiusY="2" Fill="#CCF0E2C5" Stroke="#FFD6AB13" Grid.ColumnSpan="2" Grid.RowSpan="2" StrokeThickness="2" Margin="-10,0,0,0" />

					<Grid x:Name="MetersScale" Grid.Column="1" MinWidth="20" MaxWidth="158" Height="8" Margin="0,0,0,1" HorizontalAlignment="Left" VerticalAlignment="Bottom">
						<Rectangle Margin=".75" x:Name="ThumbOuterBorderFill" IsHitTestVisible="true" Stretch="Fill" RadiusX="1" RadiusY="1">
							<Rectangle.Fill>
								<LinearGradientBrush EndPoint="0,0" StartPoint="1,1">
									<GradientStop Color="#FFF9FAFA" Offset="0" />
									<GradientStop Color="#FFCEB4AD" Offset="0.37" />
									<GradientStop Color="#FFB89187" Offset="0.42" />
									<GradientStop Color="#FFB48B80" Offset="1" />
								</LinearGradientBrush>
							</Rectangle.Fill>
						</Rectangle>
						<Rectangle Stretch="Fill" Stroke="#FFA75114" StrokeThickness="1" RadiusX="1" RadiusY="1" />
						<Rectangle Margin=".75" Stretch="Fill" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="1" RadiusY="1" />
					</Grid>

					<Grid x:Name="MilesScale" MinWidth="20" MaxWidth="158" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,1,0,0" Height="8" Width="79" Grid.Column="1" Grid.Row="1">
						<Rectangle Margin=".75" x:Name="ThumbOuterBorderFill1" IsHitTestVisible="true" Stretch="Fill" RadiusX="1" RadiusY="1">
							<Rectangle.Fill>
								<LinearGradientBrush EndPoint="0,0" StartPoint="1,1">
									<GradientStop Color="#FFF9FAFA" Offset="0" />
									<GradientStop Color="#FFCEB4AD" Offset="0.37" />
									<GradientStop Color="#FFB89187" Offset="0.42" />
									<GradientStop Color="#FFB48B80" Offset="1" />
								</LinearGradientBrush>
							</Rectangle.Fill>
						</Rectangle>
						<Rectangle Stretch="Fill" Stroke="#FFA75114" StrokeThickness="1" RadiusX="1" RadiusY="1" />
						<Rectangle Margin=".75" Stretch="Fill" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="1" RadiusY="1" />
					</Grid>

					<TextBlock FontSize="9" FontFamily="Arial" Foreground="#FF000000" HorizontalAlignment="Right" VerticalAlignment="Bottom" x:Name="MetersLabel" Margin="0,0,3,1" />
					<TextBlock HorizontalAlignment="Right" x:Name="MilesLabel" VerticalAlignment="Top" FontFamily="Arial" FontSize="9" Foreground="#FF000000" Text="" Grid.Row="1" Margin="0,1,3,0" />
	         </Grid>
			</Grid>
		</ControlTemplate>
        <ControlTemplate x:Key="C1MapsControlTemplate1" TargetType="c1:C1Maps">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid>
                            <c1:C1MapTilesLayer x:Name="Tiles" />
                            <Grid x:Name="Layers" />
                            <c1:C1MapToolsLayer x:Name="Tools" Template="{StaticResource C1MapToolsLayerControlTemplate1}" />
                        </Grid>
                    </Border>
                </ControlTemplate>
    </UserControl.Resources>
    <Border CornerRadius="10,10,0,0" Background="#FF010413">
        <c1:C1Maps x:Name="myMap" Background="Transparent" Template="{StaticResource C1MapsControlTemplate1}" Margin="5" />
    </Border>
</UserControl>