12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <Window x:Class="Reks.Windows.Cart"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:Reks.Windows"
- mc:Ignorable="d"
- Title="Cart" Height="450" Width="800">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="10*"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <ListView Grid.Row="0" Name="CartList" 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="Black">
- <Grid Width="1200" Height="195">
- <StackPanel Orientation="Horizontal">
- <Image Width="200" Height="195" Uid="{Binding ProductArticleNumber}" Loaded="Photo"/>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
- <TextBlock Margin="10,0,0,0" Width="100" TextWrapping="Wrap" Text="{Binding StringFormat=Артикль: {0}, Path=ProductArticleNumber}"/>
- <TextBlock Margin="10,0,0,0" Width="100" TextWrapping="Wrap" Text="{Binding ProductName}"/>
- <TextBlock Margin="10,0,0,0" Width="100" TextWrapping="Wrap" Uid="{Binding ProductArticleNumber}" Loaded="CostCalculate"/>
- <TextBlock Margin="10,0,0,0" Width="100" TextWrapping="Wrap" Text="{Binding ProductDescription}"/>
- <StackPanel Margin="10,0,0,0" Orientation="Vertical">
- <StackPanel Orientation="Horizontal">
- <Button Uid="{Binding ProductArticleNumber}" Click="MinusAmount" Content="-"/>
- <TextBlock Margin="10,0,0,0" Uid="{Binding ProductArticleNumber}" Loaded="AmountCalculate"/>
- <Button Uid="{Binding ProductArticleNumber}" Click="PlusAmount" Margin="10,0,0,0" Content="+"/>
- </StackPanel>
- <Button Uid="{Binding ProductArticleNumber}" Click="DeleteProduct" Margin="0,10,0,0" Content="Удалить"/>
- </StackPanel>
- </StackPanel>
- </StackPanel>
- </Grid>
- </Border>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center">
- <TextBlock VerticalAlignment="Center" Name="CostOrder"/>
- <Button Click="CreateOrder" Height="30" Margin="10,0,0,0" Content="Заказать"/>
- </StackPanel>
- </Grid>
- </Window>
|