pgBooksCatalog.xaml 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <Page x:Class="Exam19Apr.pgBooksCatalog"
  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:Exam19Apr"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="pgBooksCatalog">
  10. <Page.Resources>
  11. <DataTemplate x:Key="outputBooks">
  12. <Border BorderBrush="Black" BorderThickness="1,1,1,1">
  13. <StackPanel Orientation="Horizontal" Width="600px">
  14. <StackPanel>
  15. <Image Source="{Binding Image}" Width="100px" Height="100px"></Image>
  16. </StackPanel>
  17. <StackPanel>
  18. <StackPanel Orientation="Horizontal">
  19. <TextBlock Text="Название: "></TextBlock>
  20. <TextBlock Text="{Binding Heading}"></TextBlock>
  21. <TextBlock Text=" | "></TextBlock>
  22. <TextBlock Text="Жанр: "></TextBlock>
  23. <TextBlock Text="{Binding Style}"></TextBlock>
  24. </StackPanel>
  25. <StackPanel Orientation="Horizontal">
  26. <TextBlock Text="Автор: "></TextBlock>
  27. <TextBlock Text="{Binding Writer}"></TextBlock>
  28. </StackPanel>
  29. <StackPanel Orientation="Horizontal">
  30. <TextBlock Text="Цена: "></TextBlock>
  31. <TextBlock Text="{Binding Price}"></TextBlock>
  32. <TextBlock Text="руб."></TextBlock>
  33. </StackPanel>
  34. <StackPanel Orientation="Horizontal">
  35. <TextBlock Text="Количество в магазине: "></TextBlock>
  36. <TextBlock Text="{Binding CheckStoreCount}"></TextBlock>
  37. </StackPanel>
  38. <StackPanel Orientation="Horizontal">
  39. <TextBlock Text="Количество в магазине: "></TextBlock>
  40. <TextBlock Text="{Binding CheckStockCount}"></TextBlock>
  41. </StackPanel>
  42. <StackPanel Orientation="Horizontal">
  43. <TextBlock Text="Описание: "></TextBlock>
  44. <TextBlock Text="{Binding Specification}" TextWrapping="Wrap" MaxWidth="400px"></TextBlock>
  45. </StackPanel>
  46. <Button Name="btnAddBok" Content="Добавить в корзину" Uid="{Binding id}" Click="btnAddBok_Click"></Button>
  47. </StackPanel>
  48. </StackPanel>
  49. </Border>
  50. </DataTemplate>
  51. </Page.Resources>
  52. <Grid>
  53. <Grid.RowDefinitions>
  54. <RowDefinition/>
  55. <RowDefinition Height="4*"/>
  56. </Grid.RowDefinitions>
  57. <Border BorderBrush="Black" BorderThickness="1,1,1,1">
  58. <StackPanel Grid.Row="0" HorizontalAlignment="Right">
  59. <StackPanel Orientation="Horizontal">
  60. <TextBlock Text="Количество выбранных книг: "></TextBlock>
  61. <TextBlock Name="tbCount"></TextBlock>
  62. </StackPanel>
  63. <StackPanel Orientation="Horizontal" >
  64. <TextBlock Text="Стоимость покупки: "></TextBlock>
  65. <TextBlock Name="tbPrice"></TextBlock>
  66. <TextBlock Text=" "></TextBlock>
  67. <TextBlock Name="tbSalePrice"></TextBlock>
  68. <TextBlock Text=" руб." Name="tbRub"></TextBlock>
  69. </StackPanel>
  70. <StackPanel Orientation="Horizontal" >
  71. <TextBlock Text="Размер скидки: "></TextBlock>
  72. <TextBlock Name="tbSale"></TextBlock>
  73. <TextBlock Text=" %" Name="tbPer"></TextBlock>
  74. </StackPanel>
  75. <Button Name="btnGoCart" Content="Корзина" Click="btnGoCart_Click"></Button>
  76. </StackPanel>
  77. </Border>
  78. <ListBox Name="lbBooks" ItemTemplate="{StaticResource outputBooks}" Grid.Row="1"></ListBox>
  79. </Grid>
  80. </Page>