pgBasket.xaml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <Page x:Class="ExamBoldin.pgBasket"
  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:ExamBoldin"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="pgBasket">
  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 Cover}" Width="100px" Height="100px"></Image>
  16. </StackPanel>
  17. <StackPanel>
  18. <StackPanel Orientation="Horizontal">
  19. <TextBlock Text="Название: "></TextBlock>
  20. <TextBlock Text="{Binding Name}"></TextBlock>
  21. </StackPanel>
  22. <StackPanel Orientation="Horizontal">
  23. <TextBlock Text="Автор: "></TextBlock>
  24. <TextBlock Text="{Binding Author}"></TextBlock>
  25. </StackPanel>
  26. <StackPanel Orientation="Horizontal">
  27. <TextBlock Text="Количество: "></TextBlock>
  28. <TextBox Text="{Binding AllCount}" TextChanged="TextBox_TextChanged" Uid="{Binding id}"></TextBox>
  29. </StackPanel>
  30. <StackPanel Orientation="Horizontal">
  31. <TextBlock Text="Цена: "></TextBlock>
  32. <TextBlock Name="tbCost" Text="{Binding Cost}" TextDecorations="{Binding DecorCost}"></TextBlock>
  33. <TextBlock Text=" "></TextBlock>
  34. <TextBlock Text="{Binding CostSale}" Visibility="{Binding VisibleCostSale}"></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="lbBooksBasket" ItemTemplate="{StaticResource outputBooks}" Grid.Row="0"></ListBox>
  49. <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center">
  50. <Button Name="btnBuy" Content="Купить" Width="40px" Click="btnBuy_Click"></Button>
  51. <Button Name="btnDel" Content="Очистить" Width="60px" Click="btnDel_Click"></Button>
  52. <Button Name="btnBack" Click="btnBack_Click" Content="Назад"></Button>
  53. </StackPanel>
  54. </Grid>
  55. </Page>