1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <Page x:Class="GGwp.Guest"
- 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:GGwp"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800"
- Title="Guest">
- <Grid Background="White">
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="10*"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
- <Button 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 TextChanged="SearchChanged" Name="SearchByName" Height="30" TextAlignment="Center" Margin="10,0,0,0" Width="200"/>
- <TextBlock TextAlignment="Center" Margin="10,0,0,0" Name="AmountOfData"/>
- </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="800" Height="200" BorderThickness="1" BorderBrush="Black">
- <StackPanel>
- <StackPanel.ContextMenu>
- <ContextMenu>
- <MenuItem Header="Добавить в корзину" Uid="{Binding ProductArticleNumber}" Click="CartAdd"/>
- </ContextMenu>
- </StackPanel.ContextMenu>
- <Grid Width="795" Height="195" Loaded="BackgroundLoad" Uid="{Binding ProductArticleNumber}">
- <StackPanel Orientation="Horizontal">
- <Image Width="200" Height="195" Grid.Column="0" 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>
- <StackPanel Name="ButtonsForAdmin" Visibility="Hidden" HorizontalAlignment="Center" Orientation="Horizontal" Grid.Row="2">
- <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>
- </Grid>
- </Page>
|