Cart.xaml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <Page x:Class="modulekz.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:modulekz"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="Cart">
  10. <Page.Resources>
  11. <DataTemplate x:Key="Book">
  12. <Border BorderBrush="Black" BorderThickness="1" MaxWidth="400" MinWidth="400">
  13. <StackPanel Orientation="Horizontal">
  14. <Image Width="120" Source="{Binding Img}" Margin="10 0 10 0"/>
  15. <StackPanel Orientation="Vertical">
  16. <TextBlock Text="Название: ">
  17. <Run Text="{Binding Title}"/>
  18. </TextBlock>
  19. <TextBlock Text="Автор: ">
  20. <Run Text="{Binding Author}"/>
  21. </TextBlock>
  22. <StackPanel Orientation="Horizontal">
  23. <TextBlock Text="Количество: "/>
  24. <Button x:Name="del" Content="↓" Click="del_Click" Uid="{Binding Id}"/>
  25. <TextBlock x:Name="inc" Text="{Binding inc}"/>
  26. <Button x:Name="add" Content="↑" Click="add_Click" Uid="{Binding Id}"/>
  27. </StackPanel>
  28. <TextBlock Text="Цена: "/>
  29. <TextBlock Text="{Binding Cost}" TextDecorations="{Binding decor}"/>
  30. <TextBlock Text="{Binding NewPrice}" />
  31. </StackPanel>
  32. <Button x:Name="Delet" Content="Удалить" Click="Delet_Click" Uid="{Binding Id}"/>
  33. </StackPanel>
  34. </Border>
  35. </DataTemplate>
  36. </Page.Resources>
  37. <Grid>
  38. <Grid.RowDefinitions>
  39. <RowDefinition Height="60"/>
  40. <RowDefinition Height="*"/>
  41. </Grid.RowDefinitions>
  42. <StackPanel Orientation="Horizontal">
  43. <Button x:Name="Back" Content="Назад" Click="Back_Click" Width="70" Height="50"/>
  44. <Button x:Name="Clear" Content="Очистить" Click="Clear_Click" Width="70" Height="50"/>
  45. <Button x:Name="Buy" Content="Купить" Click="Buy_Click" Width="70" Height="50"/>
  46. </StackPanel>
  47. <ListBox x:Name="ListBook" ItemTemplate="{StaticResource Book}" Grid.Row="2"/>
  48. </Grid>
  49. </Page>