Cart.xaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <Page x:Class="examPrepare.Pages.Cart"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:examPrepare.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="Cart"
  10. Background="White"
  11. >
  12. <Grid>
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="40"></RowDefinition>
  15. <RowDefinition Height="*"></RowDefinition>
  16. </Grid.RowDefinitions>
  17. <Button Grid.Row="0" Content="Оформить" Click="Button_Click" />
  18. <ListBox Grid.Row="1" ItemsSource="{Binding Products, Mode=TwoWay}">
  19. <ListBox.ItemTemplate>
  20. <DataTemplate>
  21. <Grid>
  22. <Grid.RowDefinitions>
  23. <RowDefinition Height="1*"></RowDefinition>
  24. <RowDefinition Height="1*"></RowDefinition>
  25. </Grid.RowDefinitions>
  26. <Grid.ColumnDefinitions>
  27. <ColumnDefinition Width="1*"></ColumnDefinition>
  28. <ColumnDefinition Width="1*"></ColumnDefinition>
  29. </Grid.ColumnDefinitions>
  30. <TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding Id}" />
  31. <TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding Name}" />
  32. <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Description}"/>
  33. <TextBox TextChanged="TextBox_TextChanged" Uid="{Binding Id}" Grid.Row="1" Grid.Column="1" Text="{Binding count}" />
  34. </Grid>
  35. </DataTemplate>
  36. </ListBox.ItemTemplate>
  37. </ListBox>
  38. </Grid>
  39. </Page>