<Window x:Class="AnimationDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.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:AnimationDemo"
        xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
        mc:Ignorable="d" 
        Title="Animation Demo" Height="480" Width="640">
    <Window.DataContext>
        <local:SamplesDataSource />
    </Window.DataContext>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <ListBox x:Name="lbSamples" Width="140" ItemsSource="{Binding Samples}" SelectedIndex="0" DisplayMemberPath="Title" Padding="4" />

        <Grid DataContext="{Binding ElementName=lbSamples, Path=SelectedValue}" Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Border BorderBrush="LightGray" BorderThickness="1" Padding="8" >
                <TextBlock Text="{Binding Title}" FontSize="20" />
            </Border>
            <Border BorderBrush="LightGray" BorderThickness="1" Padding="8" Grid.Row="1" >
                <TextBlock Text="{Binding Description}" />
            </Border>
            <Border BorderBrush="LightGray" Grid.Row="2" BorderThickness="1" >
                <ContentControl Content="{Binding Demo}" />
            </Border>
        </Grid>
    </Grid>
</Window>
