Corzina.xaml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <Window x:Class="Reks.Windows.Cart"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:Reks.Windows"
  7. mc:Ignorable="d"
  8. Title="Cart" Height="450" Width="800">
  9. <Grid>
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="10*"/>
  12. <RowDefinition Height="*"/>
  13. </Grid.RowDefinitions>
  14. <ListView Grid.Row="0" Name="CartList" d:ItemsSource="{d:SampleData ItemCount=5}" >
  15. <ListView.ItemsPanel>
  16. <ItemsPanelTemplate>
  17. <WrapPanel Orientation="Vertical" HorizontalAlignment="Center"/>
  18. </ItemsPanelTemplate>
  19. </ListView.ItemsPanel>
  20. <ListView.ItemTemplate>
  21. <DataTemplate>
  22. <Border Width="1200" Height="200" BorderThickness="1" BorderBrush="Black">
  23. <Grid Width="1200" Height="195">
  24. <StackPanel Orientation="Horizontal">
  25. <Image Width="200" Height="195" Uid="{Binding ProductArticleNumber}" Loaded="Photo"/>
  26. <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
  27. <TextBlock Margin="10,0,0,0" Width="100" TextWrapping="Wrap" Text="{Binding StringFormat=Артикль: {0}, Path=ProductArticleNumber}"/>
  28. <TextBlock Margin="10,0,0,0" Width="100" TextWrapping="Wrap" Text="{Binding ProductName}"/>
  29. <TextBlock Margin="10,0,0,0" Width="100" TextWrapping="Wrap" Uid="{Binding ProductArticleNumber}" Loaded="CostCalculate"/>
  30. <TextBlock Margin="10,0,0,0" Width="100" TextWrapping="Wrap" Text="{Binding ProductDescription}"/>
  31. <StackPanel Margin="10,0,0,0" Orientation="Vertical">
  32. <StackPanel Orientation="Horizontal">
  33. <Button Uid="{Binding ProductArticleNumber}" Click="MinusAmount" Content="-"/>
  34. <TextBlock Margin="10,0,0,0" Uid="{Binding ProductArticleNumber}" Loaded="AmountCalculate"/>
  35. <Button Uid="{Binding ProductArticleNumber}" Click="PlusAmount" Margin="10,0,0,0" Content="+"/>
  36. </StackPanel>
  37. <Button Uid="{Binding ProductArticleNumber}" Click="DeleteProduct" Margin="0,10,0,0" Content="Удалить"/>
  38. </StackPanel>
  39. </StackPanel>
  40. </StackPanel>
  41. </Grid>
  42. </Border>
  43. </DataTemplate>
  44. </ListView.ItemTemplate>
  45. </ListView>
  46. <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center">
  47. <TextBlock VerticalAlignment="Center" Name="CostOrder"/>
  48. <Button Click="CreateOrder" Height="30" Margin="10,0,0,0" Content="Заказать"/>
  49. </StackPanel>
  50. </Grid>
  51. </Window>