<UserControl x:Class="OrderEntrySystem.OrderLineView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ResourceDictionary Source="SharedResources.xaml"/>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid Margin="4">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="4" />
                <ColumnDefinition Width="200" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="4" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="4" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="4" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="4" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Label Grid.Row="0" Grid.Column="0" Content="Product:" HorizontalAlignment="Right" Target="{Binding ElementName=productComboBox}" />
            <ComboBox x:Name="productComboBox" Grid.Row="0" Grid.Column="2" ItemsSource="{Binding Path=Products}" SelectedItem="{Binding Path=Product}" />
            <Label Grid.Row="2" Grid.Column="0" Content="Quantity:" HorizontalAlignment="Right" Target="{Binding ElementName=quantityTextBox}" />
            <TextBox x:Name="quantityTextBox" Grid.Row="2" Grid.Column="2" Text="{Binding Path=Quantity, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" Style="{StaticResource ResourceKey=ValidationStyleTextBox}" />
        </Grid>
        <ContentControl Grid.Row="1" Content="{Binding Path=Commands}" ContentTemplate="{StaticResource NestedCommandTemplate}" VerticalAlignment="Bottom" Margin="0,0,4,4" />
    </Grid>
</UserControl>
