<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:BoxOfficeDashboard.Views"
    xmlns:c="using:BoxOfficeDashboard.Converters"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Gauge="using:C1.Xaml.Gauge"
    x:Class="BoxOfficeDashboard.Views.OverallGrossGauge"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">
    <UserControl.Resources>
        <c:OverallGrossConverter x:Key="ogc"/>
        <c:GrossConverter x:Key="gc" />
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBlock Text="Total Gross (billions)" HorizontalAlignment="Center" Style="{StaticResource TitleTextBlockStyle}"/>
        <Gauge:C1SpeedometerGauge Grid.Row="1" Margin="10"
                             Value="{Binding Converter={StaticResource ogc}}" 
                             Maximum="12"
                             PointerFill="#FFF77D00"
                             PointerStrokeThickness="0"
                                  PointerWidth=".06">
            <Gauge:C1GaugeRange To="{Binding [7].Gross, Converter={StaticResource gc}}" Location="0.1" Fill="#65465C" Width="0.2" />
            <Gauge:C1GaugeRange To="{Binding [6].Gross, Converter={StaticResource gc}}" Location="0.2" Fill="#FFA344" Width="0.2" />
            <Gauge:C1GaugeRange To="{Binding [5].Gross, Converter={StaticResource gc}}" Location="0.3" Fill="#C69A5A" Width="0.2" />
            <Gauge:C1GaugeRange To="{Binding [4].Gross, Converter={StaticResource gc}}" Location="0.4" Fill="#63487B" Width="0.2" />
            <Gauge:C1GaugeRange To="{Binding [3].Gross, Converter={StaticResource gc}}" Location="0.5" Fill="#4A8642" Width="0.2" />
            <Gauge:C1GaugeRange To="{Binding [2].Gross, Converter={StaticResource gc}}" Location="0.6" Fill="#15597B" Width="0.2" />
            <Gauge:C1GaugeRange To="{Binding [1].Gross, Converter={StaticResource gc}}" Location="0.7" Fill="#382733" Width="0.2" />
            <Gauge:C1GaugeRange To="{Binding [0].Gross, Converter={StaticResource gc}}" Location="0.8" Fill="#F77D00" Width="0.2" />
            <!--<Gauge:C1GaugeRange To="4" Location="0.8" Fill="#088080" Width="0.2" Opacity="0.6" />
            <Gauge:C1GaugeRange From="7" Fill="#088080" Location="0.9" EndWidth="0.2" Opacity="0.3" />-->
            <Gauge:C1GaugeMark Interval="1" Location="0.9">
                <Gauge:C1GaugeMark.Template>
                    <DataTemplate>
                        <Border Width="3" Height="10" Background="#382733" />
                    </DataTemplate>
                </Gauge:C1GaugeMark.Template>
            </Gauge:C1GaugeMark>
            <Gauge:C1GaugeLabel Interval="2" Alignment="Out" AlignmentOffset="0" FontSize="16" />
        </Gauge:C1SpeedometerGauge>
    </Grid>
</UserControl>
