<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="MasterDetail.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:System_Windows_Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data">
    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFE3E3E3" />
                <GradientStop Color="#FFE3E3E3" Offset="1" />
                <GradientStop Color="#FFC5C5C5" Offset="0.51800000667572021" />
            </LinearGradientBrush>
        </Grid.Background>

        <!-- main grid layout -->
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="2*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <!-- page title -->
        <TextBlock Text="Live Master-Detail Views using C1.Silverlight.Data" Margin="5" Grid.Row="0" FontSize="20" FontWeight="Bold" />

        <!-- master data grid -->
        <TextBlock Text="Categories" Margin="5" Grid.Row="1" FontSize="16" FontWeight="Bold" Foreground="#FF000088" />
        <System_Windows_Controls:DataGrid x:Name="_gridCategories" Margin="5" Grid.Row="2" />

        <!-- detail data grid -->
        <TextBlock Text="Products" Margin="5" Grid.Row="3" FontSize="16" FontWeight="Bold" Foreground="#FF000088" />
        <System_Windows_Controls:DataGrid x:Name="_gridProducts" Margin="5" Grid.Row="4" />

        <!-- control panel -->
        <StackPanel Margin="5" Orientation="Horizontal" Grid.Row="5">
            <Button x:Name="_btnAdd" Content=" Add Item " Margin="0,0,20,0" FontSize="14" VerticalAlignment="Center" />
            <Button x:Name="_btnRemove" Content=" Remove Item " Margin="0,0,20,0" FontSize="14" VerticalAlignment="Center" />
            <Button x:Name="_btnCommit" Content=" Commit Changes " Margin="0,0,20,0" FontSize="14" VerticalAlignment="Center" />
            <TextBlock x:Name="_tbStatus" Text="Ready" VerticalAlignment="Center" FontSize="12" Foreground="Gray" />
        </StackPanel>
    </Grid>
</UserControl>