<Window x:Class="DataBinding.EditProductObject"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="EditProductObject" Height="332" Width="355"
    xmlns:local="clr-namespace:DataBinding">

  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"></RowDefinition>
      <RowDefinition Height="*"></RowDefinition>
    </Grid.RowDefinitions>

    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"></ColumnDefinition>
        <ColumnDefinition></ColumnDefinition>
        <ColumnDefinition Width="Auto"></ColumnDefinition>
      </Grid.ColumnDefinitions>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"></RowDefinition>
      </Grid.RowDefinitions>

      <TextBlock Margin="7">Product ID:</TextBlock>
      <TextBox Name="txtID" Margin="5" Grid.Column="1">356</TextBox>
      <Button Click="cmdGetProduct_Click" Margin="5" Padding="2" Grid.Column="2">Get Product</Button>
    </Grid>

    <Border Grid.Row="1" Padding="7" Margin="7" Background="LightSteelBlue">
      <Grid Name="gridProductDetails">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"></ColumnDefinition>
          <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"></RowDefinition>
          <RowDefinition Height="Auto"></RowDefinition>
          <RowDefinition Height="Auto"></RowDefinition>
          <RowDefinition Height="Auto"></RowDefinition>
          <RowDefinition Height="*"></RowDefinition>
          <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>

        <TextBlock Margin="7">Model Number:</TextBlock>
        <TextBox Margin="5" Grid.Column="1" Text="{Binding Path=ModelNumber}"></TextBox>

        <TextBlock Margin="7" Grid.Row="1">Model Name:</TextBlock>
        <TextBox Margin="5" Grid.Row="1" Grid.Column="1" Text="{Binding Path=ModelName}"></TextBox>
        
        <TextBlock Margin="7" Grid.Row="2">Unit Cost:</TextBlock>
        <TextBox Margin="5" Grid.Row="2" Grid.Column="1" Text="{Binding Path=UnitCost}"></TextBox>
                    
        <TextBlock Margin="7,7,7,0" Grid.Row="3">Description:</TextBlock>
        <TextBox Margin="7" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" 
                 VerticalScrollBarVisibility="Visible" TextWrapping="Wrap" Text="{Binding Path=Description}"></TextBox>

        <StackPanel Orientation="Horizontal" Margin="3" Grid.Row="5" Grid.ColumnSpan="2" HorizontalAlignment="Right">
          <Button Click="cmdIncreasePrice_Click" 
                  Margin="2" Padding="10,2,10,2">Increase Price</Button>
          <Button Click="cmdUpdateProduct_Click" IsDefault="True"
                  Margin="2" Padding="10,2,10,2">Update</Button>          
        </StackPanel>
      </Grid>
    </Border>
  </Grid>
</Window>
