123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <Page x:Class="Tren.Pages.BasketPage"
- 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:Tren.Pages"
- mc:Ignorable="d"
- d:DesignHeight="700" d:DesignWidth="1000"
- Title="BasketPage">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="150"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="100"/>
- <ColumnDefinition Width="250"/>
- <ColumnDefinition Width="200"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Button x:Name="OrderButton" Grid.Column="1" Style="{DynamicResource ButtonStyleBase}" Content="Сформировать заказ" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center" Padding="15" Click="OrderButton_Click" />
- <Button x:Name="ClearButton" Grid.Column="2" Style="{DynamicResource ButtonStyleBase}" Content="Очистить корзину" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center" Padding="15" Click="ClearButton_Click" />
- <Button x:Name="BackButton" Grid.Column="0" Style="{DynamicResource ButtonStyleBase}" Content="Назад" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center" Padding="15" Click="BackButton_Click" />
- <Grid Grid.Row="0" Grid.Column="3" HorizontalAlignment="Right" Margin="10">
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Label Content="Количество выбранных книг: " Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="0"/>
- <TextBlock x:Name="CountOfSelected" Text="0" Grid.Row="0" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="1"/>
- <Label Content="Стоимость покупки: " Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="0"/>
- <TextBlock x:Name="Price" Text="0" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="1"/>
- <Label Content="Размер скидки: " Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="0"/>
- <TextBlock x:Name="Discount" Text="0" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="1"/>
- </Grid>
- </Grid>
- <ListView Grid.Row="1" x:Name="BasketList">
- <ListView.ItemTemplate>
- <DataTemplate>
- <Border
- BorderThickness="1"
- BorderBrush="Black">
- <Grid HorizontalAlignment="Stretch" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="170"/>
- <ColumnDefinition Width="650"/>
- <ColumnDefinition Width="150"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Image Stretch="Uniform" HorizontalAlignment="Center" Margin="10">
- <Image.Source>
- <Binding Path="Photo">
- <Binding.TargetNullValue>
- <ImageSource>/Images/NoPhoto.jpg</ImageSource>
- </Binding.TargetNullValue>
- </Binding>
- </Image.Source>
- </Image>
- <Grid Grid.Column="1" Margin="5">
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <TextBlock
- Text="{Binding ProductName,StringFormat= {}Название: {0:N2}}"
- Grid.Row="0"
- FontFamily="Bahnschrift"
- FontSize="20"/>
- <TextBlock
- Grid.Row="1"
- Text="{Binding ProductDescription,StringFormat= {}Описание товара: {0:N2}}"
- FontFamily="Bahnschrift"
- FontSize="20"/>
- <TextBlock
- Text="{Binding Manufacturers.Name,StringFormat= {}Производитель: {0:N2}}"
- Grid.Row="2"
- FontFamily="Bahnschrift"
- FontSize="20"/>
- <TextBlock
- Grid.Row="3"
- Text="{Binding Price, StringFormat= {}Цена: {0:N2} руб. }"
- FontFamily="Bahnschrift"
- FontSize="20"/>
- <TextBlock
- Grid.Row="4"
- Text="{Binding CountInShop,StringFormat= {}Количество в магазине: {0:N0} }"
- FontFamily="Bahnschrift"
- FontSize="20"/>
- <TextBlock
- Grid.Row="5"
- Text="{Binding CountInStock, StringFormat= {}Количество на складе: {0:N0}}"
- FontFamily="Bahnschrift"
- FontSize="20"/>
- <TextBlock
- Grid.Row="6"
- Text="{Binding Description, StringFormat= {}Описание: {0:N0}}"
- FontFamily="Bahnschrift"
- TextWrapping="Wrap"
- FontSize="20"/>
- </Grid>
- <Button x:Name="DeleteButton" Grid.Column="2" Content="Удалить" Style="{DynamicResource ButtonStyleBase}" Click="DeleteButton_Click"/>
- </Grid>
- </Border>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </Grid>
- </Page>
|