<Window
  x:Class="ListBinding.Window1"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:local="clr-namespace:ListBinding"
  Title="ListBinding"
  Height="135"
  Width="315">
  <Window.Resources>
    <local:People x:Key="Family">
      <local:Person Name="Tom" Age="11" />
      <local:Person Name="John" Age="12" />
      <local:Person Name="Melissa" Age="38" />
    </local:People>
    <local:AgeToForegroundConverter x:Key="ageConverter" />
  </Window.Resources>
  <Grid DataContext="{StaticResource Family}">
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="Auto" />
      <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <TextBlock Grid.Row="0" Grid.Column="0" Margin="5" VerticalAlignment="Center">Name:</TextBlock>
    <TextBox Grid.Row="0" Grid.Column="1" Margin="5" Text="{Binding Path=Name}" />
    <TextBlock Grid.Row="1" Grid.Column="0" Margin="5" VerticalAlignment="Center">Age:</TextBlock>
    <TextBox Grid.Row="1" Grid.Column="1" Margin="5" Text="{Binding Path=Age}"
             Foreground="{Binding Path=Age, Converter={StaticResource ageConverter}}" />
    <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
      <Button Name="birthdayButton" Width="75" Margin="5">Birthday</Button>
      <Button Name="backButton" Width="75" Margin="5">&lt;</Button>
      <Button Name="forwardButton" Width="75" Margin="5">&gt;</Button>
    </StackPanel>
  </Grid>
</Window>
