<Page x:Class="examPrepare.Pages.Cart"
      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" 
      xmlns:local="clr-namespace:examPrepare.Pages"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800"
      Title="Cart"
      Background="White"
      >
    <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="40"></RowDefinition>
      <RowDefinition Height="*"></RowDefinition>
    </Grid.RowDefinitions>
    <Button Grid.Row="0" Content="Оформить" Click="Button_Click" />
    <ListBox Grid.Row="1" ItemsSource="{Binding Products, Mode=TwoWay}">
      <ListBox.ItemTemplate>
        <DataTemplate>
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="1*"></RowDefinition> 
              <RowDefinition Height="1*"></RowDefinition> 
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="1*"></ColumnDefinition> 
              <ColumnDefinition Width="1*"></ColumnDefinition> 
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding Id}" />
            <TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding Name}" />
            <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Description}"/>
            <TextBox TextChanged="TextBox_TextChanged" Uid="{Binding Id}" Grid.Row="1" Grid.Column="1" Text="{Binding count}" />
          </Grid>
        </DataTemplate>
      </ListBox.ItemTemplate> 
    </ListBox> 
    </Grid>
</Page>
