1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <Page x:Class="UP_Venediktov.Pages.ProductListUser"
- 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:UP_Venediktov.Pages"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800"
- Title="ProductListUser">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="70"></RowDefinition>
- <RowDefinition></RowDefinition>
- <RowDefinition Height="70"></RowDefinition>
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal" Grid.Row="0" Margin="15,0,0,0">
- <Button Name="BackBtn" Content="←" Height="20" Width="20" VerticalAlignment="Center"></Button>
- <GroupBox Height="60" Header="Введите текст для поиска" BorderThickness="2" BorderBrush="#76E383" Margin="10,0,0,0">
- <TextBox Name="TB_Search" Width="300" Height="30"/>
- </GroupBox>
- <ComboBox Name="CB_Sort" Width="200" Height="30" Margin="10,10,0,0"></ComboBox>
- <ComboBox Name="CB_Filter" Width="200" Height="30" Margin="20,10,0,0"></ComboBox>
- <Button Name="GoToCard" Click="CartGo" Content="Корзина" Visibility="Hidden"/>
- </StackPanel>
- <ListView Grid.Row="1" Name="ProductList" d:ItemsSource="{d:SampleData ItemCount=5}" BorderBrush="#498C51" >
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Vertical" HorizontalAlignment="Center"/>
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
- <ListView.ItemTemplate>
- <DataTemplate>
- <Border Width="800" Height="200" BorderThickness="1" BorderBrush="#498C51">
- <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" 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 HorizontalAlignment="Center" Orientation="Horizontal" Grid.Row="2">
- <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>
- <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>
- </Grid>
- </Page>
|