CardOrder.xaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <Page x:Class="UP_Venediktov.Pages.CardOrder"
  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:UP_Venediktov.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="CardOrder">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="10*"/>
  13. <RowDefinition Height="*"/>
  14. </Grid.RowDefinitions>
  15. <ListView Grid.Row="0" Name="CartList" d:ItemsSource="{d:SampleData ItemCount=5}" BorderBrush="#498C51" BorderThickness="3" >
  16. <ListView.ItemsPanel>
  17. <ItemsPanelTemplate>
  18. <WrapPanel Orientation="Vertical" HorizontalAlignment="Center"/>
  19. </ItemsPanelTemplate>
  20. </ListView.ItemsPanel>
  21. <ListView.ItemTemplate>
  22. <DataTemplate>
  23. <Border Width="800" Height="200" BorderThickness="1" BorderBrush="#498C51">
  24. <Grid Width="795" Height="195">
  25. <StackPanel Orientation="Horizontal">
  26. <Image Width="200" Height="195" Uid="{Binding ProductArticleNumber}" Loaded="Photo"/>
  27. <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
  28. <TextBlock Margin="10,0,0,0" Width="100" TextWrapping="Wrap" Text="{Binding StringFormat=Артикль: {0}, Path=ProductArticleNumber}"/>
  29. <TextBlock Margin="10,0,0,0" Width="100" TextWrapping="Wrap" Text="{Binding ProductName}"/>
  30. <TextBlock Margin="10,0,0,0" Width="100" TextWrapping="Wrap" Uid="{Binding ProductArticleNumber}" Loaded="CostCalculate"/>
  31. <TextBlock Margin="10,0,0,0" Width="100" TextWrapping="Wrap" Text="{Binding ProductDescription}"/>
  32. <StackPanel Margin="10,0,0,0" Orientation="Vertical">
  33. <StackPanel Orientation="Horizontal">
  34. <Button Uid="{Binding ProductArticleNumber}" Click="MinusAmount" Content="-"/>
  35. <TextBlock Margin="10,0,0,0" Uid="{Binding ProductArticleNumber}" Loaded="AmountCalculate"/>
  36. <Button Uid="{Binding ProductArticleNumber}" Click="PlusAmount" Margin="10,0,0,0" Content="+"/>
  37. </StackPanel>
  38. <Button Uid="{Binding ProductArticleNumber}" Click="DeleteProduct" Margin="0,10,0,0" Content="Удалить"/>
  39. </StackPanel>
  40. </StackPanel>
  41. </StackPanel>
  42. </Grid>
  43. </Border>
  44. </DataTemplate>
  45. </ListView.ItemTemplate>
  46. </ListView>
  47. <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center">
  48. <TextBlock VerticalAlignment="Center" Name="CostOrder"/>
  49. <Button Click="CreateOrder" Height="30" Margin="10,0,0,0" Content="Подтвердить заказ" BorderBrush="#498C51" BorderThickness="3"/>
  50. </StackPanel>
  51. </Grid>
  52. </Page>