12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <Page x:Class="Books_Shop_Kopey.Pages.Books"
- 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:Books_Shop_Kopey.Pages"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800"
- Title="Books" IsVisibleChanged="Page_IsVisibleChanged">
- <Page.Resources>
- <Style x:Key="TextBD">
- <Setter Property="Control.FontSize" Value="10" />
- <Setter Property="Control.Foreground" Value="Black" />
- <Setter Property="Control.IsEnabled" Value="False" />
- </Style>
- <Style x:Key="Border">
- <Setter Property="Control.BorderBrush" Value="#FF444242" />
- <Setter Property="Control.OpacityMask" Value="#FF939393" />
- <Setter Property="Control.BorderThickness" Value="1" />
- <Setter Property="Control.Margin" Value="2" />
- </Style>
- </Page.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="43*"/>
- <RowDefinition Height="407*"/>
- </Grid.RowDefinitions>
- <Button x:Name="DobvKorz" Grid.Row="0" Click="DobvKorz_Click">Добавить в корзину</Button>
- <ListView x:Name="list" HorizontalContentAlignment="Stretch" ItemsSource="{Binding Path=DataListGet, UpdateSourceTrigger=PropertyChanged}" Grid.Row="1">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid Columns="1" />
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Border Style="{StaticResource Border}" >
- <StackPanel Background="{x:Null}" HorizontalAlignment="Stretch" Orientation="Horizontal">
- <Border Style="{StaticResource Border}">
- <Image Width="140" Height="140" Source="{Binding image}" x:Name="IMG" Stretch="Uniform"/>
- </Border>
- <StackPanel Background="{x:Null}" Style="{StaticResource TextBD}" Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="1">
- <StackPanel Orientation="Horizontal" >
- <TextBlock Margin="5 0 5 0">Название книги:</TextBlock>
- <TextBlock Height="20" TextWrapping="Wrap" x:Name="booksname" Text="{Binding name_books}"/>
- <TextBlock Height="20" TextWrapping="Wrap" Text="|"/>
- <TextBlock Margin="5 0 5 0">Жанр:</TextBlock>
- <TextBlock Height="20" TextWrapping="Wrap" x:Name="gen" Text="{Binding genre}"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal" >
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Margin="5 0 5 0">Автор:</TextBlock>
- <TextBlock Height="20" x:Name="Aut" Text="{Binding autor}"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Margin="5 0 5 0">Цена:</TextBlock>
- <TextBlock Height="20" x:Name="costonebooks" Text="{Binding cost, ValidatesOnExceptions=True, StringFormat={}{0:F0} руб.}"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Height="20" Margin="5 0 5 0" Text="Количество в магазине: "></TextBlock>
- <TextBlock Height="20" TextWrapping="Wrap" Text="{Binding count_books_magaz}"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Height="20" Margin="5 0 5 0" Text="Количество на складе: "></TextBlock>
- <TextBlock Height="20" TextWrapping="Wrap" Text="{Binding count_books_sklad}"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal" >
- <TextBlock Height="20" Margin="5 0 5 0" Text="Описание: "></TextBlock>
- <TextBlock Height="20" TextWrapping="Wrap" Text="{Binding description}"/>
- </StackPanel>
- </StackPanel>
- </StackPanel>
- </Border>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ListView>
- </Grid>
- </Page>
|