TourListView.xaml 5.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <Page x:Class="WpfAppHotel.TourListView"
  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:WpfAppHotel"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="TourListView"
  10. Style="{StaticResource pgStyle}">
  11. <Page.Resources>
  12. <BitmapImage x:Key="defaultImage" UriSource="/image/picture.png"/>
  13. </Page.Resources>
  14. <Grid>
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="4*"/>
  17. <RowDefinition Height="9*"/>
  18. <RowDefinition Height="1*"/>
  19. </Grid.RowDefinitions>
  20. <GroupBox Grid.Row="0" Margin="10">
  21. <Grid >
  22. <StackPanel Orientation="Vertical">
  23. <StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Center">
  24. <TextBlock Text="Введите текст для поиска:" Style="{StaticResource tblStyle}"/>
  25. <TextBox Name="TBoxFind" Width="200" HorizontalAlignment="Left" TextChanged="TBoxFind_TextChanged"/>
  26. </StackPanel>
  27. <StackPanel Orientation="Horizontal">
  28. <StackPanel Orientation="Horizontal" Margin="10" HorizontalAlignment="Right">
  29. <TextBlock Text="Тип тура: " Style="{StaticResource tblStyle}"/>
  30. <ComboBox Name="CbType" Width="200" Height="40" HorizontalAlignment="Left" SelectionChanged="Filter_SelectionChanged"/>
  31. </StackPanel>
  32. <StackPanel Orientation="Horizontal" Margin="10" HorizontalAlignment="Left">
  33. <TextBlock Text="Сортировка: " Style="{StaticResource tblStyle}"/>
  34. <ComboBox Name="CbSort" Width="200" Height="40" HorizontalAlignment="Left" SelectionChanged="Filter_SelectionChanged">
  35. <ComboBoxItem>Нет</ComboBoxItem>
  36. <ComboBoxItem>Стоимость↑</ComboBoxItem>
  37. <ComboBoxItem>Стоимость↓</ComboBoxItem>
  38. </ComboBox>
  39. </StackPanel>
  40. <StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Center" >
  41. <CheckBox Name="chBActual" Click="chBActual_Click"/>
  42. <TextBlock Text="Только акутальные туры" Style="{StaticResource tblStyle}" Margin="5 0 0 0"/>
  43. </StackPanel>
  44. </StackPanel>
  45. </StackPanel>
  46. </Grid>
  47. </GroupBox>
  48. <ListView x:Name="ListTour" Grid.Row="1" Height= "350" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HorizontalAlignment="Center">
  49. <ListView.ItemTemplate>
  50. <DataTemplate>
  51. <Border Padding="10" CornerRadius="20" BorderThickness="1" BorderBrush="#445c93" Background="{Binding ColorTour}">
  52. <Grid Width="300" Height="300">
  53. <ScrollViewer>
  54. <StackPanel>
  55. <StackPanel>
  56. <TextBlock Text="Продажа" HorizontalAlignment="Left" FontSize="22" FontWeight ="Bold"/>
  57. <TextBlock TextWrapping="Wrap" Text="{Binding Name}" Name="tbnameHotel"/>
  58. <Image Width="100" Height="100" Source="{Binding ImagePreview, TargetNullValue={StaticResource defaultImage}}"/>
  59. <TextBlock HorizontalAlignment="Center" Text="{Binding Costes}"/>
  60. <TextBlock HorizontalAlignment="Center" Text="{Binding Actuality}" Background="{Binding ActualityColor}"/>
  61. <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="{Binding TicetsCount}"/>
  62. </StackPanel>
  63. </StackPanel>
  64. </ScrollViewer>
  65. </Grid>
  66. </Border>
  67. </DataTemplate>
  68. </ListView.ItemTemplate>
  69. </ListView>
  70. <StackPanel Grid.Row="3">
  71. <Grid>
  72. <Button x:Name="btnExit" Template="{StaticResource btnStyle}" HorizontalAlignment="Left" Content="Назад" Click="btnExit_Click"/>
  73. <StackPanel Grid.Column="2" Name="spCost" Margin="35,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.ColumnSpan="2">
  74. <TextBlock Text="Общая стоимость туров" HorizontalAlignment="Center" Style="{StaticResource tblStyle}"/>
  75. <TextBlock Name="tbCost" Text="580000" HorizontalAlignment="Center" Style="{StaticResource tblStyle}"/>
  76. </StackPanel>
  77. </Grid>
  78. </StackPanel>
  79. </Grid>
  80. </Page>