123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <Page x:Class="test.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:test"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800"
- Title="books">
- <Page.Resources>
- <DataTemplate x:Key="allbooks">
- <Border BorderBrush="Black" BorderThickness="1" Width="1700">
- <StackPanel Uid="{Binding IdBook}" Orientation="Horizontal">
- <Image Source="{Binding Image}" Width="100" Height="100"></Image>
- <StackPanel Orientation="Vertical">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Название: "></TextBlock>
- <TextBlock Text="{Binding Title}"></TextBlock>
- <TextBlock Text=" | Жанр: "></TextBlock>
- <TextBlock Text="{Binding titleGenre}"></TextBlock>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Автор: "></TextBlock>
- <TextBlock Text="{Binding nameAuthor}"></TextBlock>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Цена: "></TextBlock>
- <TextBlock Text="{Binding Cost, StringFormat=0}"></TextBlock>
- <TextBlock Text=" руб."></TextBlock>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Кол-во в магазе: "></TextBlock>
- <TextBlock Text="{Binding Store}"></TextBlock>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Кол-во на складе: "></TextBlock>
- <TextBlock Text="{Binding Stock}"></TextBlock>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Описание: "></TextBlock>
- <TextBlock Text="{Binding des}"></TextBlock>
- </StackPanel>
- </StackPanel>
- <Button x:Name="add" Click="add_Click" Uid="{Binding IdBook}" Content="Добавление в корзину"></Button>
- </StackPanel>
- </Border>
- </DataTemplate>
- </Page.Resources>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="91*"/>
- <RowDefinition Height="359*"/>
- </Grid.RowDefinitions>
- <ListBox x:Name="lb" Grid.Row="1" ItemTemplate="{Binding allbooks}"></ListBox>
- <Border Grid.Row="0" HorizontalAlignment="Right" BorderBrush="Black" BorderThickness="1" Height="75" Margin="0,0,50,0">
- <StackPanel Orientation="Vertical">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Количество выбранных книг: "></TextBlock>
- <TextBlock x:Name="kolbook"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Стоимость покупки: "></TextBlock>
- <TextBlock x:Name="price" TextDecorations="{Binding op}"/>
- <TextBlock Text=" "/>
- <TextBlock x:Name="newprice" Visibility="Hidden"/>
- <TextBlock Text=" руб."/>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Размер скидки: "></TextBlock>
- <TextBlock x:Name="sale"/>
- <TextBlock Text="%"/>
- </StackPanel>
- <Button Content="Посмотреть содержание карзины" Name="korzina" Click="korz_Click"></Button>
- </StackPanel>
- </Border>
- </Grid>
- </Page>
|