12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <Window x:Class="WriteErase.Windows.ShoppingCart"
- 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:WriteErase.Windows"
- mc:Ignorable="d"
- Title="ShoppingCart" 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="800" Height="170" CornerRadius="10" BorderThickness="1" BorderBrush="Black">
- <Grid Width="800" Height="170">
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
- <Image Width="150" Height="150" Margin="10 0 0 0" Uid="{Binding ProductArticleNumber}" Loaded="Photo"/>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
- <TextBlock FontSize="15" Margin="30,0,0,0" Width="100" TextWrapping="Wrap" Text="{Binding StringFormat=Артикул: {0}, Path=ProductArticleNumber}"/>
- <TextBlock FontSize="15" Margin="10,0,0,0" Width="100" TextWrapping="Wrap" Text="{Binding ProductName}"/>
- <TextBlock FontSize="15" Margin="10,0,0,0" Width="100" TextWrapping="Wrap" Uid="{Binding ProductArticleNumber}" Loaded="CostCalculate"/>
- <TextBlock FontSize="15" Margin="10,0,0,0" Width="100" TextWrapping="Wrap" Text="{Binding ProductDescription}"/>
- <StackPanel Margin="10,0,0,0" Orientation="Vertical">
- <StackPanel Orientation="Horizontal">
- <Border BorderThickness="1" CornerRadius="7" BorderBrush="#bababa" Width="30" Height="30" Background="LightGray" Margin="5,0,0,0" >
- <Button HorizontalAlignment="Center" VerticalAlignment="Center" Background="#0000" BorderBrush="#0000" FontSize="14" Uid="{Binding ProductArticleNumber}" Click="MinusAmount" Content="➖"/>
- </Border>
- <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15" Margin="10,0,0,0" Uid="{Binding ProductArticleNumber}" Loaded="AmountCalculate"/>
- <Border BorderThickness="1" CornerRadius="7" BorderBrush="#bababa" Width="30" Height="30" Background="LightGray" Margin="10,0,0,0" >
- <Button HorizontalAlignment="Center" VerticalAlignment="Center" Background="#0000" BorderBrush="#0000" FontSize="14" Uid="{Binding ProductArticleNumber}" Click="PlusAmount" Content="➕"/>
- </Border>
- </StackPanel>
- <Border BorderThickness="1" CornerRadius="7" BorderBrush="#bababa" Width="80" Height="30" Background="LightGray" Margin="5,5,0,0" >
- <Button HorizontalAlignment="Center" VerticalAlignment="Center" Background="#0000" BorderBrush="#0000" FontSize="14" Uid="{Binding ProductArticleNumber}" Click="DeleteProduct" Content="Удалить"/>
- </Border>
- </StackPanel>
- </StackPanel>
- </StackPanel>
- </Grid>
- </Border>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center">
- <TextBlock FontSize="15" VerticalAlignment="Center" Name="CostOrder"/>
- <Border BorderThickness="1" CornerRadius="7" BorderBrush="#bababa" Width="100" Height="30" Background="LightGray" Margin="5,0,0,0" >
- <Button HorizontalAlignment="Center" VerticalAlignment="Center" Background="#0000" BorderBrush="#0000" FontSize="14" Click="CreateOrder" Content="Заказать"/>
- </Border>
-
- </StackPanel>
- </Grid>
- </Window>
|