<UserControl
    x:Class="SalesDashboard2015.TotalSales"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:c1="using:C1.Xaml.Gauge"
    xmlns:local="using:SalesDashboard2015"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400" Loaded="UserControl_Loaded">
    <UserControl.Resources>
        <Style TargetType="local:AnimatedGauge">
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="Margin" Value="20 25 -80 -80" />
            <Setter Property="Minimum" Value="0" />
            <Setter Property="Maximum" Value="150" />
            <Setter Property="StartAngle" Value="-90" />
            <Setter Property="SweepAngle" Value="90" />
            <Setter Property="BorderThickness" Value="0" />
            <Setter Property="PointerCapSize" Value="0.15,0.15" />
            <Setter Property="PointerCapStrokeThickness" Value="0" />
            <Setter Property="PointerFill" Value="#fffbb258" />
            <Setter Property="PointerStrokeThickness" Value="0" />
            <Setter Property="PointerWidth" Value="0.09" />
            <Setter Property="PointerOffset" Value="0.0" />
            <Setter Property="PointerCapFill">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#fffbb258"/>
                        <GradientStop Color="#fffbb258" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid Background="Black">
        <Grid Margin="5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <local:AnimatedGauge x:Name="gauge" HorizontalAlignment="Center">
                <local:AnimatedGauge.EasingFunction>
                    <ElasticEase Oscillations="3" Springiness="3" />
                </local:AnimatedGauge.EasingFunction>
                <c1:C1GaugeRange From="0" To="150" Width="1" Location=".4" Opacity="0.3">
                    <c1:C1GaugeRange.Fill>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <LinearGradientBrush.RelativeTransform>
                                <CompositeTransform CenterY="0.5" CenterX="0.5" />
                            </LinearGradientBrush.RelativeTransform>
                            <GradientStop Color="#ff8c8c8c" Offset="1"/>
                            <GradientStop/>
                        </LinearGradientBrush>
                    </c1:C1GaugeRange.Fill>
                </c1:C1GaugeRange>
                <c1:C1GaugeRange From="0" To="150" Width=".18" Location=".9" >
                    <c1:C1GaugeRange.Fill>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <LinearGradientBrush.RelativeTransform>
                                <CompositeTransform CenterY="0.5" CenterX="0.5" Rotation="-90"/>
                            </LinearGradientBrush.RelativeTransform>
                            <GradientStop Color="#ff88bde6"/>
                            <GradientStop Color="#ff88bde6" Offset="1"/>
                        </LinearGradientBrush>
                    </c1:C1GaugeRange.Fill>
                </c1:C1GaugeRange>
                <c1:C1GaugeMark Interval="30" Location="1.3" />
                <c1:C1GaugeMark Interval="5" Location="1.3" />
            </local:AnimatedGauge>
            <StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
                <TextBlock FontSize="30" FontWeight="Light" LineHeight="30">
                <Run Text="{Binding RunTotalOne_Text,Source={StaticResource SalesDashboardLocalization}}"/>
                <LineBreak/>
                <Run Text="{Binding RunTotalTwo_Text,Source={StaticResource SalesDashboardLocalization}}"/>
                <Run x:Name="runTotal"/>
                <Run Text="{Binding RunTotalThree_Text,Source={StaticResource SalesDashboardLocalization}}"/>
                </TextBlock>
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>