123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <Page x:Class="Tren.Pages.MainPage"
- 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="MainPage">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="150"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="350"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Button x:Name="BasketButton" Style="{DynamicResource ButtonStyleBase}" Content="Корзина" FontSize="35" VerticalAlignment="Center" HorizontalAlignment="Center" Padding="15" Click="Button_Click" Visibility="Hidden"/>
- <Grid Grid.Row="0" Grid.Column="1" 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="100" 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="100" 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="100" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="1"/>
- </Grid>
- </Grid>
- <ListView Grid.Row="1" x:Name="MainList">
- <ListView.ItemTemplate >
- <DataTemplate>
- <Border
- BorderThickness="1"
- BorderBrush="Black">
- <Grid HorizontalAlignment="Stretch" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="170"/>
- <ColumnDefinition Width="800"/>
- </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>
- </Grid>
- </Border>
- </DataTemplate>
- </ListView.ItemTemplate>
- <ListView.ContextMenu>
- <ContextMenu>
- <MenuItem Header="Добавить к заказу" Click="MenuItem_Click" ></MenuItem>
- </ContextMenu>
- </ListView.ContextMenu>
- </ListView>
- </Grid>
- </Page>
|