<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="GeoDashboard.IncomeTile" 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_Household_Income]}">

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

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

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

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

      <c1:C1FlexGrid ItemsSource="{Binding ShortList}">
        <c1:C1FlexGrid.Columns>
          <c1:Column Binding="{Binding Name}" HorizontalAlignment="Right" Width="*" />
          <c1:Column Binding="{Binding Value, StringFormat=n0}" Width="*" CellTemplate="{StaticResource _histoCell}" />
        </c1:C1FlexGrid.Columns>
      </c1:C1FlexGrid>

    </StackPanel>
  </Grid>
</UserControl>