UserBlank.xaml 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <Page x:Class="Reks.Pages.UserGuestPage"
  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:Reks.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="UserGuestPage">
  10. <Grid Background="White">
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="*"/>
  13. <RowDefinition Height="10*"/>
  14. <RowDefinition Height="*"/>
  15. </Grid.RowDefinitions>
  16. <StackPanel HorizontalAlignment="Center" Orientation="Horizontal" >
  17. <Button Height="30" Click="BackToAuth" Content="Выйти"/>
  18. <Button Margin="20,0,0,0" Height="30" Click="CartGo" Name="ToCart" Content="Корзина" Visibility="Hidden"/>
  19. <ComboBox SelectionChanged="SortFilterChanged" Name="SortByName" Height="30" Margin="10,0,0,0" Width="200"/>
  20. <ComboBox SelectionChanged="SortFilterChanged" Name="FilterByPromo" Height="30" Margin="10,0,0,0" Width="200"/>
  21. <TextBox VerticalContentAlignment="Center" TextChanged="SearchChanged" Name="SearchByName" Height="30" TextAlignment="Center" Margin="10,0,0,0" Width="200"/>
  22. <TextBlock VerticalAlignment="Center" TextAlignment="Center" Margin="10,0,0,0" Name="AmountOfData"/>
  23. <StackPanel Name="ButtonsForAdmin" Visibility="Hidden" HorizontalAlignment="Center" Orientation="Horizontal" Grid.Row="2" Margin="10,0,0,0">
  24. <Button Width="70" Height="30" Content="Добавить"/>
  25. <Button Margin="10,0,0,0" Height="30" Width="90" Content="Редактировать"/>
  26. <Button Margin="10,0,0,0" Height="30" Width="70" Content="Удалить"/>
  27. </StackPanel>
  28. <StackPanel Margin="10,0,0,0" Name="ViewOrder" Visibility="Hidden" HorizontalAlignment="Center" Orientation="Horizontal" Grid.Row="2">
  29. <Button Width="150" Height="30" Click="ViewOrders" Content="заказы"/>
  30. </StackPanel>
  31. </StackPanel>
  32. <ListView Grid.Row="1" Name="ProductList" d:ItemsSource="{d:SampleData ItemCount=5}">
  33. <ListView.ItemsPanel>
  34. <ItemsPanelTemplate>
  35. <WrapPanel Orientation="Vertical" HorizontalAlignment="Center"/>
  36. </ItemsPanelTemplate>
  37. </ListView.ItemsPanel>
  38. <ListView.ItemTemplate>
  39. <DataTemplate>
  40. <Border Width="1200" Height="200" BorderThickness="1" BorderBrush="Green">
  41. <StackPanel>
  42. <StackPanel.ContextMenu>
  43. <ContextMenu>
  44. <MenuItem Header="Добавить в корзину" Uid="{Binding ProductArticleNumber}" Click="CartAdd"/>
  45. </ContextMenu>
  46. </StackPanel.ContextMenu>
  47. <Grid Width="1200" Height="195" Loaded="BackgroundLoad" Uid="{Binding ProductArticleNumber}">
  48. <StackPanel Orientation="Horizontal">
  49. <Image Width="200" Height="195" Uid="{Binding ProductArticleNumber}" Loaded="Photo"/>
  50. <StackPanel Margin="10,0,0,0" Width="300" HorizontalAlignment="Center" Grid.Column="1" Orientation="Vertical">
  51. <TextBlock Text="{Binding ProductName}"/>
  52. <TextBlock Text="{Binding ProductDescription}" TextWrapping="Wrap"/>
  53. <TextBlock Text="{Binding StringFormat=Произоводитель: {0},Path=Manufacturers.ManufacturerName}"/>
  54. <TextBlock Text="{Binding ProductCost}" Uid="{Binding ProductArticleNumber}" Loaded="StrikePrice"/>
  55. <TextBlock Text="{Binding ProductCost}" Uid="{Binding ProductArticleNumber}" Loaded="PromoPrice"/>
  56. </StackPanel>
  57. <TextBlock Margin="10,0,0,0" HorizontalAlignment="Center" Grid.Column="2" Text="{Binding StringFormat=Скидка: {0}%, Path=ProductMaxDiscountAmount}"/>
  58. </StackPanel>
  59. </Grid>
  60. </StackPanel>
  61. </Border>
  62. </DataTemplate>
  63. </ListView.ItemTemplate>
  64. </ListView>
  65. </Grid>
  66. </Page>