<Window x:Class="TutorialsWPF.CategoryProductsView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:TutorialsWPF"
        Title="CategoryProductsView" Height="507" Width="945">
    <Grid>
        <Grid.DataContext>
            <!-- Create a view model for this view. -->
            <local:CategoryProductsViewModel />
        </Grid.DataContext>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <!-- The following controls are bound to live views defined in CategoryProductsViewModel. -->
        <ComboBox HorizontalAlignment="Left" Margin="4,4,4,0" Name="comboBox1" Width="221" ItemsSource="{Binding Categories}" DisplayMemberPath="CategoryName" />
        <DataGrid Grid.Row="1" Margin="4" AutoGenerateColumns="True" Name="dataGrid1" ItemsSource="{Binding Products}"/>
    </Grid>
</Window>
