1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <Page x:Class="Reks.Pages.UserGuestPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:Reks.Pages"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800"
- Title="UserGuestPage">
- <Grid Background="White">
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="10*"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal" >
- <Button Height="30" Click="BackToAuth" Content="Выйти"/>
- <Button Margin="20,0,0,0" Height="30" Click="CartGo" Name="ToCart" Content="Корзина" Visibility="Hidden"/>
- <ComboBox SelectionChanged="SortFilterChanged" Name="SortByName" Height="30" Margin="10,0,0,0" Width="200"/>
- <ComboBox SelectionChanged="SortFilterChanged" Name="FilterByPromo" Height="30" Margin="10,0,0,0" Width="200"/>
- <TextBox VerticalContentAlignment="Center" TextChanged="SearchChanged" Name="SearchByName" Height="30" TextAlignment="Center" Margin="10,0,0,0" Width="200"/>
- <TextBlock VerticalAlignment="Center" TextAlignment="Center" Margin="10,0,0,0" Name="AmountOfData"/>
- <StackPanel Name="ButtonsForAdmin" Visibility="Hidden" HorizontalAlignment="Center" Orientation="Horizontal" Grid.Row="2" Margin="10,0,0,0">
- <Button Width="70" Height="30" Content="Добавить"/>
- <Button Margin="10,0,0,0" Height="30" Width="90" Content="Редактировать"/>
- <Button Margin="10,0,0,0" Height="30" Width="70" Content="Удалить"/>
- </StackPanel>
- <StackPanel Margin="10,0,0,0" Name="ViewOrder" Visibility="Hidden" HorizontalAlignment="Center" Orientation="Horizontal" Grid.Row="2">
- <Button Width="150" Height="30" Click="ViewOrders" Content="заказы"/>
- </StackPanel>
- </StackPanel>
-
- <ListView Grid.Row="1" Name="ProductList" d:ItemsSource="{d:SampleData ItemCount=5}">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Vertical" HorizontalAlignment="Center"/>
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
- <ListView.ItemTemplate>
- <DataTemplate>
- <Border Width="1200" Height="200" BorderThickness="1" BorderBrush="Green">
- <StackPanel>
- <StackPanel.ContextMenu>
- <ContextMenu>
- <MenuItem Header="Добавить в корзину" Uid="{Binding ProductArticleNumber}" Click="CartAdd"/>
- </ContextMenu>
- </StackPanel.ContextMenu>
- <Grid Width="1200" Height="195" Loaded="BackgroundLoad" Uid="{Binding ProductArticleNumber}">
- <StackPanel Orientation="Horizontal">
- <Image Width="200" Height="195" Uid="{Binding ProductArticleNumber}" Loaded="Photo"/>
- <StackPanel Margin="10,0,0,0" Width="300" HorizontalAlignment="Center" Grid.Column="1" Orientation="Vertical">
- <TextBlock Text="{Binding ProductName}"/>
- <TextBlock Text="{Binding ProductDescription}" TextWrapping="Wrap"/>
- <TextBlock Text="{Binding StringFormat=Произоводитель: {0},Path=Manufacturers.ManufacturerName}"/>
- <TextBlock Text="{Binding ProductCost}" Uid="{Binding ProductArticleNumber}" Loaded="StrikePrice"/>
- <TextBlock Text="{Binding ProductCost}" Uid="{Binding ProductArticleNumber}" Loaded="PromoPrice"/>
- </StackPanel>
- <TextBlock Margin="10,0,0,0" HorizontalAlignment="Center" Grid.Column="2" Text="{Binding StringFormat=Скидка: {0}%, Path=ProductMaxDiscountAmount}"/>
- </StackPanel>
- </Grid>
- </StackPanel>
- </Border>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
-
- </Grid>
- </Page>
|