<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="Olympics.Page" mc:Ignorable="d" SizeChanged="UserControl_SizeChanged" 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:local="clr-namespace:Olympics" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows">
    <UserControl.Resources>

        <Style x:Key="ItemTitle" TargetType="TextBlock">
            <Setter Property="VerticalAlignment" Value="Bottom" />
            <Setter Property="Margin" Value="25 5 0 5" />
            <Setter Property="FontFamily" Value="Trebuchet MS" />
            <Setter Property="FontWeight" Value="Bold" />
        </Style>
        <ControlTemplate x:Key="ItemTemplate" TargetType="c1:C1HeaderedContentControl">
            <Grid x:Name="map" RenderTransformOrigin="0.5,0.5" ShowGridLines="False" MinWidth="100" d:IsLocked="True">
                <Grid.RowDefinitions>
                    <RowDefinition x:Name="topSpace" Height="10" />
                    <RowDefinition Height="*" />
                    <RowDefinition x:Name="bottomSpace" Height="30" />
                    <RowDefinition Height="15" />
                </Grid.RowDefinitions>
                <Border x:Name="border" CornerRadius="15" BorderThickness="5" Grid.Row="1">
                    <Border.BorderBrush>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FF691500" Offset="1" />
                            <GradientStop Color="#FFB85300" Offset="0" />
                        </LinearGradientBrush>
                    </Border.BorderBrush>
                    <!--- content -->
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition Height="35" />
                        </Grid.RowDefinitions>
                        <Border Grid.Row="0" CornerRadius="12 12 0 0" Background="Transparent" Padding="0">
                            <ContentControl Content="{TemplateBinding Content}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" />
                        </Border>
                        <Border Grid.Row="1" CornerRadius="0 0 12 12" Background="#CCB97D25">
                            <ContentControl Content="{TemplateBinding Header}" HorizontalContentAlignment="Center" />
                        </Border>
                    </Grid>
                    <!--- end content -->
                </Border>
                <Rectangle x:Name="shadow" Grid.Row="3" Stretch="Fill" RadiusX="10" RadiusY="10" Fill="#26000000" StrokeThickness="5" />
            </Grid>
        </ControlTemplate>

        <Style x:Key="ButtonExpand" TargetType="Button">
            <Setter Property="IsEnabled" Value="true" />
            <Setter Property="IsTabStop" Value="true" />
            <Setter Property="Background" Value="#FF003255" />
            <Setter Property="Foreground" Value="#FF313131" />
            <Setter Property="MinWidth" Value="5" />
            <Setter Property="MinHeight" Value="5" />
            <Setter Property="Margin" Value="0" />
            <Setter Property="HorizontalContentAlignment" Value="Center" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="Cursor" Value="Arrow" />
            <Setter Property="FontSize" Value="11" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid Width="35">
                            <Grid.Resources>
                                <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="MouseOverLinearBevelDarkEndColor">#7FFFFFFF</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>
                                <Color x:Key="CurvedBevelFillStartColor">#B3FFFFFF</Color>
                                <Color x:Key="CurvedBevelFillEndColor">#3CFFFFFF</Color>
                                <SolidColorBrush x:Key="BorderBrush" Color="#FF000000" />
                                <SolidColorBrush x:Key="AccentBrush" Color="#FFFFFFFF" />
                                <SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF" />
                                <LinearGradientBrush x:Key="FocusedStrokeBrush" EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#B2FFFFFF" Offset="0" />
                                    <GradientStop Color="#51FFFFFF" Offset="1" />
                                    <GradientStop Color="#66FFFFFF" Offset="0.325" />
                                    <GradientStop Color="#1EFFFFFF" Offset="0.325" />
                                </LinearGradientBrush>
                            </Grid.Resources>
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualStateGroup.Transitions>
                                        <vsm:VisualTransition GeneratedDuration="0:0:0.2" To="MouseOver" />
                                        <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
                                    </vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualState x:Name="Normal">
                                        <Storyboard />
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="{StaticResource MouseOverLinearBevelDarkEndColor}" />
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)">
                                                <SplineDoubleKeyFrame KeyTime="0" Value=".2" />
                                            </DoubleAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="{StaticResource HoverLinearBevelLightEndColor}" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="{StaticResource HoverLinearBevelLightEndColor}" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="{StaticResource HoverLinearBevelDarkStartColor}" />
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="0" Value="{StaticResource HoverLinearBevelDarkEndColor}" />
                                            </ColorAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DownStroke" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0" />
                                            </DoubleAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DownStroke" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <vsm:Visibility>Collapsed</vsm:Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                            </DoubleAnimationUsingKeyFrames>
                                        </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>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <vsm:Visibility>Collapsed</vsm:Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle1" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF290909" />
                                            </ColorAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.8" />
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Unfocused">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Visibility">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0" />
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Rectangle x:Name="Background" RadiusX="3" RadiusY="3" Stroke="#FF222222">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFA90404" />
                                        <GradientStop Color="#FF222222" Offset="1" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Rectangle x:Name="BackgroundGradient" Stroke="{StaticResource BorderBrush}" StrokeThickness="1" RadiusX="4" RadiusY="4" Visibility="Collapsed">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.7,1" StartPoint="0.7,0">
                                        <GradientStop Color="{StaticResource LinearBevelLightStartColor}" Offset="0" />
                                        <GradientStop Color="{StaticResource LinearBevelLightEndColor}" Offset="0.35" />
                                        <GradientStop Color="{StaticResource LinearBevelDarkStartColor}" Offset="0.35" />
                                        <GradientStop Color="{StaticResource LinearBevelDarkEndColor}" Offset="1" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Grid Margin="2" x:Name="CurvedBevelScale" Visibility="Collapsed">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="7*" />
                                    <RowDefinition Height="3*" />
                                </Grid.RowDefinitions>
                                <Path Margin="3,0,3,0" x:Name="CurvedBevel" Data="F1 M 0,0.02 V 0.15 C 0.15,0.22 0.30,0.25 0.50,0.26 C 0.70,0.26 0.85,0.22 1,0.15 V 0.02 L 0.97,0 H 0.02 L 0,0.02 Z" Stretch="Fill">
                                    <Path.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="{StaticResource CurvedBevelFillStartColor}" Offset="0" />
                                            <GradientStop Color="{StaticResource CurvedBevelFillEndColor}" Offset="1" />
                                        </LinearGradientBrush>
                                    </Path.Fill>
                                </Path>
                            </Grid>
                            <Grid x:Name="FocusVisual" Visibility="Collapsed">
                                <Rectangle Margin="2" Stroke="{StaticResource AccentBrush}" StrokeThickness="1" RadiusX="3" RadiusY="3" d:IsHidden="True" x:Name="rectangle" />
                                <Rectangle StrokeThickness="2" RadiusX="3" RadiusY="3" Stroke="#FF000000" x:Name="rectangle1" />
                                <Rectangle Stroke="{StaticResource FocusedStrokeBrush}" StrokeThickness="2" RadiusX="3" RadiusY="3" />
                            </Grid>
                            <Grid x:Name="DownStroke" Opacity="0">
                                <Rectangle Margin="1,2,1,1" Opacity="0.05" Stroke="{TemplateBinding Background}" StrokeThickness="1" RadiusX="3" RadiusY="3" />
                                <Rectangle Margin="1,1.75,1,1" Opacity="0.05" Stroke="{TemplateBinding Background}" StrokeThickness="1" RadiusX="3" RadiusY="3" />
                                <Rectangle Margin="1,1.5,1,1" Opacity="0.05" Stroke="{TemplateBinding Background}" StrokeThickness="1" RadiusX="3" RadiusY="3" />
                                <Rectangle Margin="1,1.25,1,1" Opacity="0.05" Stroke="{TemplateBinding Background}" StrokeThickness="1" RadiusX="3" RadiusY="3" />
                                <Rectangle Margin="1" Opacity="1" Stroke="{TemplateBinding Background}" StrokeThickness="1" RadiusX="3" RadiusY="3" />
                                <Rectangle Margin="1" StrokeThickness="1" RadiusX="4" RadiusY="4">
                                    <Rectangle.Stroke>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#A5FFFFFF" Offset="0" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </LinearGradientBrush>
                                    </Rectangle.Stroke>
                                </Rectangle>
                            </Grid>
                            <Rectangle x:Name="DisabledVisual" IsHitTestVisible="false" Opacity="0" Fill="{StaticResource DisabledBrush}" RadiusX="4" RadiusY="4" />
                            <Path HorizontalAlignment="Center" VerticalAlignment="Top" Data="M1.9990002,5.0310001 L2.9990001,5.0310001 L2.9990001,6.0310001 L1.9990002,6.0310001 L1.9990002,5.0310001 z M0,5.0170002 L1,5.0170002 L1,6.0170002 L0,6.0170002 L0,5.0170002 z M11.028,5.0010004 L12.028,5.0010004 L12.028,6.0009999 L11.028,6.0009999 L11.028,5.0010004 z M3.9970002,3.0310006 L4.9970002,3.0310006 L4.9970002,4.0310006 L3.9990001,4.0310006 L3.9990001,5.0310001 L2.9990001,5.0310001 L2.9990001,4.0310006 L3.9970002,4.0310006 L3.9970002,3.0310006 z M7.0279999,3.0180006 L8.0279999,3.0180006 L8.0279999,4.0170002 L9.0279999,4.0170002 L9.0279999,5.0170002 L10.028,5.0170002 L10.028,6.0170002 L9.0279999,6.0170002 L9.0279999,5.0170002 L8.0279999,5.0170002 L8.0279999,4.0180001 L7.0279999,4.0180001 L7.0279999,3.0180006 z M1.9990002,3.016 L2.9990001,3.016 L2.9990001,4.0160003 L2.0009999,4.0160003 L2.0009999,5.0160003 L1.0009999,5.0160003 L1.0009999,4.0160003 L1.9990002,4.0160003 L1.9990002,3.016 z M9.0279999,3.0020001 L10.028,3.0020001 L10.028,4.0010004 L11.028,4.0010004 L11.028,5.0010004 L10.028,5.0010004 L10.028,4.0020003 L9.0279999,4.0020003 L9.0279999,3.0020001 z M5.0130005,2.0150001 L7.0130005,2.0150001 L7.0130005,3.0150001 L5.0130005,3.0150001 L5.0130005,2.0150001 z M3.9970002,1.0159998 L4.9970002,1.0159998 L4.9970002,2.016 L3.9990001,2.016 L3.9990001,3.016 L2.9990001,3.016 L2.9990001,2.016 L3.9970002,2.016 L3.9970002,1.0159998 z M7.0279999,1.0030003 L8.0279999,1.0030003 L8.0279999,2.0020001 L9.0279999,2.0020001 L9.0279999,3.0020001 L8.0279999,3.0020001 L8.0279999,2.0030005 L7.0279999,2.0030005 L7.0279999,1.0030003 z M5.013,0 L7.013,0 L7.013,1 L5.013,1 L5.013,0 z" Stretch="Fill" Opacity="0.8" Height="7" Width="13" Margin="0,4,0,0" d:IsHidden="True" Visibility="Collapsed">
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFFFFFFF" Offset="0.625" />
                                        <GradientStop Color="#FF4D1818" Offset="1" />
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Path HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Opacity="0.8" Data="M4.3221655,2.3399103 L4.3221655,2.3764641 L4.3221655,2.3399103 z M5.418108,0 L7.579731,0 L7.579731,1.15248 L7.595943,1.1670606 L7.595943,1.1641523 L8.676755,1.1641523 L8.676755,2.3142657 L8.6827927,2.3236611 L9.7575665,2.3236611 L9.7575665,3.4699309 L9.772006,3.4843309 L10.838378,3.4843309 L10.838378,4.6383886 L10.842679,4.6438403 L11.919189,4.6438403 L11.919189,5.8045101 L11.908747,5.8045101 L11.919189,5.8274865 L11.919189,5.8045101 L13.000001,5.8045101 L13.000001,6.9651794 L0,6.9837503 L0,5.8230805 L1.0808116,5.8230805 L1.0808116,5.8270655 L1.0850352,5.8219199 L1.0818923,5.8219199 L1.0818923,4.6612501 L2.1580222,4.6612501 L2.1605425,4.6585555 L2.1605425,3.5005801 L3.2413538,3.5005801 L3.2413538,3.5032253 L3.2438283,3.5005801 L3.2413538,3.5005801 L3.2413538,2.3399103 L4.320004,2.3399103 L4.320004,1.1792403 L5.4008155,1.1792403 L5.4008155,1.1997644 L5.4363003,1.1606699 L5.418108,1.1606699 L5.418108,0 z" Stretch="Fill" Width="10" Height="5" x:Name="path">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform />
                                        <SkewTransform />
                                        <RotateTransform />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </Path.RenderTransform>
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFFFFFFF" Offset="0.625" />
                                        <GradientStop Color="#FF4D1818" Offset="1" />
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Path x:Name="glass" Data="M0,2.8534837 C0,1.1966301 1.222387,0 2.8792405,0 L32.172314,0 C33.829155,0 34.896912,1.1966301 34.896912,2.8534837 L35,6.6820683 C27.657009,-1.9105045 7.5373831,14.563504 0,6.6820683 z" Stretch="Fill" Margin="1,1,1,7.11600017547607" Fill="#26FFFFFF" />
                            <ContentPresenter Margin="4,5,0,6" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="Left" Width="12" Visibility="Collapsed" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="ButtonDownload" TargetType="Button">
            <Setter Property="IsEnabled" Value="true" />
            <Setter Property="IsTabStop" Value="true" />
            <Setter Property="Background" Value="#FF003255" />
            <Setter Property="Foreground" Value="#FF313131" />
            <Setter Property="MinWidth" Value="5" />
            <Setter Property="MinHeight" Value="5" />
            <Setter Property="Margin" Value="0" />
            <Setter Property="HorizontalContentAlignment" Value="Center" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="Cursor" Value="Arrow" />
            <Setter Property="FontSize" Value="11" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <Grid.Resources>
                                <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="MouseOverLinearBevelDarkEndColor">#7FFFFFFF</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>
                                <Color x:Key="CurvedBevelFillStartColor">#B3FFFFFF</Color>
                                <Color x:Key="CurvedBevelFillEndColor">#3CFFFFFF</Color>
                                <SolidColorBrush x:Key="BorderBrush" Color="#FF000000" />
                                <SolidColorBrush x:Key="AccentBrush" Color="#FFFFFFFF" />
                                <SolidColorBrush x:Key="DisabledBrush" Color="#A5FFFFFF" />
                                <LinearGradientBrush x:Key="FocusedStrokeBrush" EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#B2FFFFFF" Offset="0" />
                                    <GradientStop Color="#51FFFFFF" Offset="1" />
                                    <GradientStop Color="#66FFFFFF" Offset="0.325" />
                                    <GradientStop Color="#1EFFFFFF" Offset="0.325" />
                                </LinearGradientBrush>
                            </Grid.Resources>
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualStateGroup.Transitions>
                                        <vsm:VisualTransition GeneratedDuration="0:0:0.2" To="MouseOver" />
                                        <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
                                    </vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualState x:Name="Normal">
                                        <Storyboard />
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="MouseOver">
                                        <Storyboard />
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DownStroke" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DisabledVisual" Storyboard.TargetProperty="Opacity">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                            </DoubleAnimationUsingKeyFrames>
                                        </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>
                            <Rectangle x:Name="Background" RadiusX="4" RadiusY="4">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FF101010" Offset="0.51" />
                                        <GradientStop Color="#FF5B5B5B" Offset="0.49" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Rectangle x:Name="Background_Copy" RadiusX="4" RadiusY="4" Opacity="0.15">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.513000011444092,0.0570000000298023" StartPoint="0.5,0" SpreadMethod="Repeat">
                                        <GradientStop Color="#00BFBFBF" Offset="0.888" />
                                        <GradientStop Color="#FFFFFFFF" Offset="0.897" />
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Rectangle Margin="1" x:Name="Accent" RadiusX="3" RadiusY="3" StrokeThickness="1" Stroke="#FF670E00" />
                            <Grid x:Name="FocusVisual" Visibility="Collapsed">
                                <Rectangle Margin="2" RadiusX="3" RadiusY="3" Stroke="{StaticResource AccentBrush}" StrokeThickness="1" />
                                <Rectangle RadiusX="3" RadiusY="3" Stroke="{TemplateBinding Background}" StrokeThickness="2" />
                                <Rectangle RadiusX="3" RadiusY="3" Stroke="{StaticResource FocusedStrokeBrush}" StrokeThickness="2" />
                            </Grid>
                            <Grid x:Name="DownStroke" Opacity="0">
                                <Rectangle Margin="1,2,1,1" Opacity="0.05" RadiusX="3" RadiusY="3" Stroke="{TemplateBinding Background}" StrokeThickness="1" />
                                <Rectangle Margin="1,1.75,1,1" Opacity="0.05" RadiusX="3" RadiusY="3" Stroke="{TemplateBinding Background}" StrokeThickness="1" />
                                <Rectangle Margin="1,1.5,1,1" Opacity="0.05" RadiusX="3" RadiusY="3" Stroke="{TemplateBinding Background}" StrokeThickness="1" />
                                <Rectangle Margin="1,1.25,1,1" Opacity="0.05" RadiusX="3" RadiusY="3" Stroke="{TemplateBinding Background}" StrokeThickness="1" />
                                <Rectangle Margin="1" Opacity="1" RadiusX="3" RadiusY="3" Stroke="{TemplateBinding Background}" StrokeThickness="1" />
                                <Rectangle Margin="1" RadiusX="4" RadiusY="4" StrokeThickness="1">
                                    <Rectangle.Stroke>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#A5FFFFFF" Offset="0" />
                                            <GradientStop Color="#FFFFFFFF" Offset="1" />
                                        </LinearGradientBrush>
                                    </Rectangle.Stroke>
                                </Rectangle>
                            </Grid>
                            <ContentPresenter Margin="4,5,4,4" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                            <Rectangle x:Name="DisabledVisual" IsHitTestVisible="false" Opacity="0" RadiusX="4" RadiusY="4" Fill="{StaticResource DisabledBrush}" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>

        <!-- Background -->
        <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="0" Grid.RowSpan="2" Stroke="#FF0F0F0F" StrokeThickness="3" x:Name="background">
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF600700" Offset="0" />
                    <GradientStop Color="#FFE4C474" Offset="0.304" />
                    <GradientStop Color="#FFB75804" Offset="0.768" />
                    <GradientStop Color="#FF600700" Offset="1" />
                    <GradientStop Color="#FFD69F37" Offset="0.567" />
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Image Opacity="1" Grid.Row="0" Grid.RowSpan="3" Source="ribbons.png" Stretch="Fill" VerticalAlignment="Bottom" Margin="0,2,0,3" Width="1560" Height="760" HorizontalAlignment="Center" x:Name="ribbons">
            <Image.OpacityMask>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF000000" Offset="0" />
                    <GradientStop Color="#FFFFFFFF" Offset="1" />
                </LinearGradientBrush>
            </Image.OpacityMask>
        </Image>
        <Image Height="88" x:Name="icos" VerticalAlignment="Bottom" Width="961" Grid.Row="1" Source="icons.png" Stretch="Fill" HorizontalAlignment="Center" />
        <Image Height="255" HorizontalAlignment="Center" x:Name="letters" VerticalAlignment="Top" Width="1168" Grid.Row="1" Source="letters.png" Stretch="Fill" Opacity="0.65" />
        <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Stroke="#FF222222" StrokeThickness="3" Grid.RowSpan="2" x:Name="Border" />
        <!-- End Background -->

        <!-- Header -->
        <Image Height="167" HorizontalAlignment="Center" x:Name="title" Width="449" Source="title.png" Stretch="Fill" VerticalAlignment="Top" />
        <Grid Width="110" Height="110" VerticalAlignment="Top" Margin="-233,15,0,0" x:Name="panelClock" d:LayoutOverrides="Width" HorizontalAlignment="Center" />
        <!-- End Header -->

        <!-- Views -->
        <Canvas x:Name="container" Grid.Row="1" Margin="0,20,0,0">

            <!-- Grid -->
            <c1:C1HeaderedContentControl x:Name="hdrGrid" Template="{StaticResource ItemTemplate}" Width="629" HorizontalAlignment="Left">
                <c1:C1HeaderedContentControl.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="0.25" ScaleY="0.25" />
                        <TranslateTransform X="10" Y="100" />
                    </TransformGroup>
                </c1:C1HeaderedContentControl.RenderTransform>
                <c1:C1HeaderedContentControl.Header>
                    <TextBlock Style="{StaticResource ItemTitle}">
                        <Run Text="Medals: " Foreground="#FF4b1109" FontSize="16" />
                        <Run Text="TABLE VIEW" Foreground="#FF6a4000" FontSize="13" />
                    </TextBlock>
                </c1:C1HeaderedContentControl.Header>
                <Grid Background="Black" Height="300" />
            </c1:C1HeaderedContentControl>

            <!-- Map -->
            <c1:C1HeaderedContentControl x:Name="hdrMap" Template="{StaticResource ItemTemplate}" Width="629" HorizontalAlignment="Left">
                <c1:C1HeaderedContentControl.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1" />
                        <TranslateTransform X="230" Y="0" />
                    </TransformGroup>
                </c1:C1HeaderedContentControl.RenderTransform>
                <c1:C1HeaderedContentControl.Header>
                    <TextBlock Style="{StaticResource ItemTitle}">
                        <Run Text="Medals: " Foreground="#FF4b1109" FontSize="16" />
                        <Run Text="MAP VIEW" Foreground="#FF6a4000" FontSize="13" />
                    </TextBlock>
                </c1:C1HeaderedContentControl.Header>
                <Grid Background="Black" Height="300" />
            </c1:C1HeaderedContentControl>

            <!-- Chart -->
            <c1:C1HeaderedContentControl x:Name="hdrChart" Template="{StaticResource ItemTemplate}" Width="629" HorizontalAlignment="Left">
                <c1:C1HeaderedContentControl.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="0.25" ScaleY="0.25" />
                        <TranslateTransform X="1049" Y="100" />
                    </TransformGroup>
                </c1:C1HeaderedContentControl.RenderTransform>
                <c1:C1HeaderedContentControl.Header>
                    <TextBlock Style="{StaticResource ItemTitle}">
                        <Run Text="Medals: " Foreground="#FF4b1109" FontSize="16" />
                        <Run Text="CHART VIEW" Foreground="#FF6a4000" FontSize="13" />
                    </TextBlock>
                </c1:C1HeaderedContentControl.Header>
                <Grid Background="Black" Height="300" />
            </c1:C1HeaderedContentControl>
        </Canvas>
        <!-- End Views -->

        <!-- Footer -->
        <Grid Grid.Row="2" Grid.RowSpan="2" Background="#555b9e">
            <Button x:Name="btnExpand" Width="35" Height="16" Margin="0 -7 0 0" FontSize="12" HorizontalAlignment="Center" VerticalAlignment="Top" Click="Button_Click" Style="{StaticResource ButtonExpand}" RenderTransformOrigin="0.5,0.5">
                <Button.RenderTransform>
                    <RotateTransform Angle="180" />
                </Button.RenderTransform>
            </Button>
        </Grid>

        <Grid x:Name="footerC1" Grid.Row="2" Height="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="7*" />
                <ColumnDefinition Width="1" />
                <ColumnDefinition Width="3*" />
            </Grid.ColumnDefinitions>
            <StackPanel Margin="50 15 15 15" Grid.Column="0">
                <TextBlock Text="ComponentOne Studio for Silverlight has more than 30 controls for Silverlight, including:" Foreground="#FF828282" FontSize="11" TextWrapping="Wrap" FontWeight="Normal" />
                <TextBlock Text="Chart, DataGrid, Gauge, Maps, Book, TreeView, Uploader, RichTextBox, ComboBox, Input controls, Layout panels and much more!" Foreground="#FFC7C7C7" FontSize="13" TextWrapping="Wrap" />
                <Image Width="576" Source="controls.png" Stretch="Fill" Height="131" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="0,20,0,0" MouseLeftButtonDown="Image_MouseLeftButtonDown" Cursor="Hand" />
            </StackPanel>
            <Rectangle Stretch="Fill" Grid.Column="1" Width="2" StrokeThickness="0" Opacity="0.7" Margin="0,20,0,0">
                <Rectangle.Fill>
                    <LinearGradientBrush EndPoint="0.560999989509583,0.00300000002607703" StartPoint="-0.0769999995827675,0.00300000002607703">
                        <GradientStop Color="#FF000000" Offset="0.5" />
                        <GradientStop Color="#FFA9A9A9" Offset="0.5" />
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>
            <StackPanel Margin="0,15,15,15" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center">
                <Button x:Name="btnDownload" Content="Download Now!" Foreground="White" FontSize="14" Width="140" Height="50" Margin="10" Click="btnDownload_Click" Style="{StaticResource ButtonDownload}" />
                <Button x:Name="btnPurchase" Content="Buy Now" Background="DarkRed" Foreground="White" FontSize="14" FontWeight="Normal" Height="50" Click="btnPurchase_Click" Style="{StaticResource ButtonDownload}" Width="140" Margin="10" />
            </StackPanel>
        </Grid>

        <Grid Grid.Row="3">
            <TextBlock x:Name="txtUIStatus" HorizontalAlignment="Left" VerticalAlignment="Center" FontFamily="Arial" FontSize="11" Margin="20 0 0 0" Foreground="#FFBBBABA" Text="Retrieving data..." TextWrapping="Wrap" />
            <Image Height="26" HorizontalAlignment="Right" x:Name="c1logo" VerticalAlignment="Center" Width="110" Source="c1-logo.png" Stretch="Fill" Margin="0,1,20,3" />
            <TextBlock HorizontalAlignment="Right" Margin="0,0,155,0" VerticalAlignment="Center" FontFamily="Arial" FontSize="11" Foreground="#FFBBBABA" Text="Powered By" TextWrapping="Wrap" />
        </Grid>
        <Path Height="63.083" HorizontalAlignment="Center" Margin="-243,15,0,0" VerticalAlignment="Top" Stretch="Fill" Data="M103.41995,51.709999 C84.058006,11.361142 20.057964,91.361534 -3.0517578E-05,51.709999 C-3.0517578E-05,23.151356 23.151321,0 51.709961,0 C80.2686,0 103.41995,23.151356 103.41995,51.709999 z" Width="105" d:LayoutOverrides="Width, Height">
            <Path.Fill>
                <RadialGradientBrush>
                    <RadialGradientBrush.RelativeTransform>
                        <TransformGroup>
                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleY="1.657" />
                            <SkewTransform CenterX="0.5" CenterY="0.5" />
                            <RotateTransform CenterX="0.5" CenterY="0.5" />
                            <TranslateTransform Y="0.328" />
                        </TransformGroup>
                    </RadialGradientBrush.RelativeTransform>
                    <GradientStop Color="#00FFFFFF" Offset="0.42" />
                    <GradientStop Color="#7FFFFFFF" Offset="1" />
                </RadialGradientBrush>
            </Path.Fill>
        </Path>
        <!-- End Footer -->

    </Grid>
</UserControl>