DataList.xaml 5.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <Page x:Class="Learn.DataList"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:Learn"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="DataList">
  10. <Grid Background="White">
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="*"/>
  13. <RowDefinition Height="12*"/>
  14. <RowDefinition Height="*"/>
  15. </Grid.RowDefinitions>
  16. <StackPanel Orientation="Horizontal" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center">
  17. <StackPanel Width="100" VerticalAlignment="Center" Margin="0,0,10,0" HorizontalAlignment="Right">
  18. <Button Click="Login" Background="#0000">Войти</Button>
  19. </StackPanel>
  20. <StackPanel Orientation="Vertical">
  21. <TextBlock FontWeight="Bold" HorizontalAlignment="Center">Сортировка по цене</TextBlock>
  22. <StackPanel Orientation="Horizontal">
  23. <RadioButton Checked="Up_Checked" Margin="0,0,10,0" GroupName="PriceSort" Name="Up">По возрастанию</RadioButton>
  24. <RadioButton Checked="Down_Checked" GroupName="PriceSort" Name="Down">По убыванию</RadioButton>
  25. </StackPanel>
  26. </StackPanel>
  27. <StackPanel VerticalAlignment="Center" Margin="10,0,0,0" Width="150">
  28. <ComboBox Name="PromoFilter" SelectionChanged="PromoChange"/>
  29. </StackPanel>
  30. <TextBox Margin="10,0,0,0" Width="150" Name="Search" TextChanged="SearchChange"/>
  31. </StackPanel>
  32. <ListView Grid.Row="1" Name="ServiceData">
  33. <ListView.ItemsPanel>
  34. <ItemsPanelTemplate>
  35. <WrapPanel Orientation="Vertical" HorizontalAlignment="Center"/>
  36. </ItemsPanelTemplate>
  37. </ListView.ItemsPanel>
  38. <ListView.ItemTemplate>
  39. <DataTemplate>
  40. <Border Width="800" Height="200" BorderThickness="3" BorderBrush="Black" CornerRadius="4">
  41. <Grid Width="800" Height="200" Loaded="BackgroundLoad" Uid="{Binding ID}">
  42. <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
  43. <Border BorderThickness="4" Width="180" Height="180" BorderBrush="Black" CornerRadius="4">
  44. <Image Source="{Binding MainImagePath}" Width="180" Height="180"/>
  45. </Border>
  46. <StackPanel Height="180" Margin="10,0,0,0">
  47. <TextBlock Text="{Binding Title}"/>
  48. <StackPanel Orientation="Horizontal">
  49. <TextBlock Uid="{Binding ID}" Text="{Binding StringFormat={}{0:#}, Path=Cost}" TextDecorations="Strikethrough" Loaded="Strike" Margin="0,0,5,0"/>
  50. <TextBlock Uid="{Binding ID}" Text="{Binding StringFormat={}{0:#} рублей, Path=Cost}" Loaded="PriceLoad"/>
  51. <TextBlock Uid="{Binding ID}" Loaded="Minutes"/>
  52. </StackPanel>
  53. <TextBlock Uid="{Binding ID}" Loaded="Promo"/>
  54. <StackPanel Loaded="DelEditLoad" Visibility="Hidden" VerticalAlignment="Bottom" Orientation="Horizontal">
  55. <Border CornerRadius="5" Width="200" Height="25" BorderBrush="Black" BorderThickness="4">
  56. <Button Uid="{Binding ID}" Click="RedServ" BorderBrush="#0000" VerticalContentAlignment="Center" Background="#0000" Name="Edit">редактировать</Button>
  57. </Border>
  58. <Border Margin="10,0,0,0" CornerRadius="5" Width="150" Height="25" BorderBrush="Black" BorderThickness="4">
  59. <Button Uid="{Binding ID}" Click="DeleteServ" BorderBrush="#0000" VerticalContentAlignment="Center" Background="#0000" Name="Delete">удалить</Button>
  60. </Border>
  61. <Border Margin="10,0,0,0" CornerRadius="5" Width="150" Height="25" BorderBrush="Black" BorderThickness="4">
  62. <Button Uid="{Binding ID}" Click="MakeReg" BorderBrush="#0000" VerticalContentAlignment="Center" Background="#0000" Name="Reg">записаться</Button>
  63. </Border>
  64. </StackPanel>
  65. </StackPanel>
  66. </StackPanel>
  67. </Grid>
  68. </Border>
  69. </DataTemplate>
  70. </ListView.ItemTemplate>
  71. </ListView>
  72. <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center">
  73. <TextBlock Name="global"></TextBlock>
  74. <Button Visibility="Collapsed" Margin="10,0,0,0" HorizontalAlignment="Center" Loaded="AddS" Click="Add">Добавить услугу</Button>
  75. </StackPanel>
  76. </Grid>
  77. </Page>