12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <Page x:Class="Learn.DataList"
- 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:Learn"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800"
- Title="DataList">
- <Grid Background="White">
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="12*"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center">
- <StackPanel Width="100" VerticalAlignment="Center" Margin="0,0,10,0" HorizontalAlignment="Right">
- <Button Click="Login" Background="#0000">Войти</Button>
- </StackPanel>
- <StackPanel Orientation="Vertical">
- <TextBlock FontWeight="Bold" HorizontalAlignment="Center">Сортировка по цене</TextBlock>
- <StackPanel Orientation="Horizontal">
- <RadioButton Checked="Up_Checked" Margin="0,0,10,0" GroupName="PriceSort" Name="Up">По возрастанию</RadioButton>
- <RadioButton Checked="Down_Checked" GroupName="PriceSort" Name="Down">По убыванию</RadioButton>
- </StackPanel>
- </StackPanel>
- <StackPanel VerticalAlignment="Center" Margin="10,0,0,0" Width="150">
- <ComboBox Name="PromoFilter" SelectionChanged="PromoChange"/>
- </StackPanel>
- <TextBox Margin="10,0,0,0" Width="150" Name="Search" TextChanged="SearchChange"/>
- </StackPanel>
-
- <ListView Grid.Row="1" Name="ServiceData">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Vertical" HorizontalAlignment="Center"/>
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
- <ListView.ItemTemplate>
- <DataTemplate>
- <Border Width="800" Height="200" BorderThickness="3" BorderBrush="Black" CornerRadius="4">
- <Grid Width="800" Height="200" Loaded="BackgroundLoad" Uid="{Binding ID}">
- <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
- <Border BorderThickness="4" Width="180" Height="180" BorderBrush="Black" CornerRadius="4">
- <Image Source="{Binding MainImagePath}" Width="180" Height="180"/>
- </Border>
- <StackPanel Height="180" Margin="10,0,0,0">
- <TextBlock Text="{Binding Title}"/>
- <StackPanel Orientation="Horizontal">
- <TextBlock Uid="{Binding ID}" Text="{Binding StringFormat={}{0:#}, Path=Cost}" TextDecorations="Strikethrough" Loaded="Strike" Margin="0,0,5,0"/>
- <TextBlock Uid="{Binding ID}" Text="{Binding StringFormat={}{0:#} рублей, Path=Cost}" Loaded="PriceLoad"/>
- <TextBlock Uid="{Binding ID}" Loaded="Minutes"/>
- </StackPanel>
- <TextBlock Uid="{Binding ID}" Loaded="Promo"/>
- <StackPanel Loaded="DelEditLoad" Visibility="Hidden" VerticalAlignment="Bottom" Orientation="Horizontal">
- <Border CornerRadius="5" Width="200" Height="25" BorderBrush="Black" BorderThickness="4">
- <Button Uid="{Binding ID}" Click="RedServ" BorderBrush="#0000" VerticalContentAlignment="Center" Background="#0000" Name="Edit">редактировать</Button>
- </Border>
- <Border Margin="10,0,0,0" CornerRadius="5" Width="150" Height="25" BorderBrush="Black" BorderThickness="4">
- <Button Uid="{Binding ID}" Click="DeleteServ" BorderBrush="#0000" VerticalContentAlignment="Center" Background="#0000" Name="Delete">удалить</Button>
- </Border>
- <Border Margin="10,0,0,0" CornerRadius="5" Width="150" Height="25" BorderBrush="Black" BorderThickness="4">
- <Button Uid="{Binding ID}" Click="MakeReg" BorderBrush="#0000" VerticalContentAlignment="Center" Background="#0000" Name="Reg">записаться</Button>
- </Border>
- </StackPanel>
- </StackPanel>
- </StackPanel>
- </Grid>
- </Border>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center">
- <TextBlock Name="global"></TextBlock>
- <Button Visibility="Collapsed" Margin="10,0,0,0" HorizontalAlignment="Center" Loaded="AddS" Click="Add">Добавить услугу</Button>
- </StackPanel>
- </Grid>
- </Page>
|