PageList.xaml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <Page x:Class="WpfAppProduct.PageList"
  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:WpfAppProduct"
  7. mc:Ignorable="d"
  8. d:DesignHeight="850" d:DesignWidth="1200"
  9. Title="PageList">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="*"/>
  13. <RowDefinition Height="5*"/>
  14. <RowDefinition Height="70"/>
  15. </Grid.RowDefinitions>
  16. <TextBlock Text="Продукты" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  17. <ListView Name="LvProduct" Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch">
  18. <ListView.ItemTemplate>
  19. <DataTemplate>
  20. <Border BorderThickness="1" BorderBrush="Black" CornerRadius="1">
  21. <Grid>
  22. <Grid.ColumnDefinitions>
  23. <ColumnDefinition Width="*"/>
  24. <ColumnDefinition Width="2*"/>
  25. </Grid.ColumnDefinitions>
  26. <StackPanel Orientation="Horizontal">
  27. <Image Width="150"/>
  28. </StackPanel>
  29. <StackPanel Grid.Column="1">
  30. <TextBlock Text="{Binding ProductName}" FontSize="14" FontFamily="Arial"/>
  31. <TextBlock Text="{Binding Desc}" FontSize="14" FontFamily="Arial"/>
  32. <TextBlock Text="{Binding Price}" FontSize="14" FontFamily="Arial"/>
  33. </StackPanel>
  34. </Grid>
  35. </Border>
  36. </DataTemplate>
  37. </ListView.ItemTemplate>
  38. <ListView.ContextMenu>
  39. <ContextMenu>
  40. <MenuItem Header="Добавить в корзину" Click="MenuItem_Click" FontSize="14" FontFamily="Arial" Uid="{Binding ProductName}"/>
  41. </ContextMenu>
  42. </ListView.ContextMenu>
  43. </ListView>
  44. <Grid Grid.Row="2">
  45. <Grid.ColumnDefinitions>
  46. <ColumnDefinition Width="*"/>
  47. <ColumnDefinition Width="*"/>
  48. </Grid.ColumnDefinitions>
  49. <Button Name="BtnBasket" Content="Просмотр корзины" Visibility="Collapsed" Width="150" Height="30" FontSize="14" Click="BtnBasket_Click"/>
  50. </Grid>
  51. </Grid>
  52. </Page>