pgTrash.xaml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <Page x:Class="Exam19Apr.pgTrash"
  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="pgTrash">
  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. </StackPanel>
  22. <StackPanel Orientation="Horizontal">
  23. <TextBlock Text="Автор: "></TextBlock>
  24. <TextBlock Text="{Binding Writer}"></TextBlock>
  25. </StackPanel>
  26. <StackPanel Orientation="Horizontal">
  27. <TextBlock Text="Количество: "></TextBlock>
  28. <TextBox Text="{Binding FullCount}" TextChanged="TextBox_TextChanged" Uid="{Binding id}"></TextBox>
  29. </StackPanel>
  30. <StackPanel Orientation="Horizontal">
  31. <TextBlock Text="Цена: "></TextBlock>
  32. <TextBlock Name="tbCost" Text="{Binding Price}" TextDecorations="{Binding DecorationPrice}"></TextBlock>
  33. <TextBlock Text=" "></TextBlock>
  34. <TextBlock Text="{Binding PriceSale}" Visibility="{Binding VisiblePriceSale}"></TextBlock>
  35. <TextBlock Text=" руб."></TextBlock>
  36. </StackPanel>
  37. <Button Name="btnDeleteBook" Content="Удалить" Click="btnDeleteBook_Click" Uid="{Binding id}"></Button>
  38. </StackPanel>
  39. </StackPanel>
  40. </Border>
  41. </DataTemplate>
  42. </Page.Resources>
  43. <Grid>
  44. <Grid.RowDefinitions>
  45. <RowDefinition Height="4*"/>
  46. <RowDefinition Height="1*"/>
  47. </Grid.RowDefinitions>
  48. <ListBox Name="lbBooksBuy" ItemTemplate="{StaticResource outputBooks}" Grid.Row="0"></ListBox>
  49. <StackPanel Orientation="Horizontal" Grid.Row="1">
  50. <Button Name="btnBuy" Content="Купить" Width="40px" Click="btnBuy_Click"></Button>
  51. <Button Name="btnDel" Content="Очистить" Width="40px" Click="btnDel_Click"></Button>
  52. <Button Name="btnBack" Click="btnBack_Click" Content="Назад"></Button>
  53. </StackPanel>
  54. </Grid>
  55. </Page>