<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="GeoDashboard.NetWorthTile" Width="254" Height="177" Margin="6" Foreground="White" FontFamily="Segoe UI" FontSize="24" FontWeight="Light" 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:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:GeoDashboard">

  <Grid x:Name="LayoutRoot" Background="Black" DataContext="{Binding Path=Sources[USA_Median_Net_Worth]}">

    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition />
    </Grid.RowDefinitions>

    <Border Style="{StaticResource _tileCaption}">
      <TextBlock Text="Median Net Worth" FontSize="12" Foreground="Black" />
    </Border>

    <StackPanel Margin="12" Grid.Row="1">

      <TextBlock Text="{Binding Dictionary[MEDNW_CY].Value, StringFormat=c0}" FontWeight="Bold" Foreground="{StaticResource _brResult}" />

      <c1:C1RadialGauge Minimum="0" Maximum="300000" Background="Transparent" Width="200" Height="200" Margin="80 -20 0 0" StartAngle="-90" SweepAngle="90" BorderBrush="Transparent" PointerFill="White" PointerStrokeThickness="0" PointerCapFill="White" PointerCapStrokeThickness="0" Value="{Binding Dictionary[MEDNW_CY].Value}">
        <c1:C1GaugeRange Fill="LightGray" From="{Binding Dictionary[MEDNW_CY].Value}" To="300000" Width=".2" Location=".7" Opacity=".4" />
        <c1:C1GaugeRange Fill="{StaticResource _brResult}" From="0" To="{Binding Dictionary[MEDNW_CY].Value}" Width=".2" Location=".7" />
        <c1:C1GaugeLabel Interval="100000" Location="1.1" Format="#,##0,k" FontFamily="Segoe UI" FontSize="10" Foreground="White" />
      </c1:C1RadialGauge>
    </StackPanel>
  </Grid>
</UserControl>