ToursPage.xaml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <Page x:Class="LR1_05._04.ToursPage"
  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:LR1_05._04"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="ToursPage">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="auto"></RowDefinition>
  13. <RowDefinition Height="*"></RowDefinition>
  14. </Grid.RowDefinitions>
  15. <WrapPanel Orientation="Horizontal" HorizontalAlignment="Center">
  16. <StackPanel Orientation="Horizontal">
  17. <TextBox Text="Введите название для поиска:" Width="175" TextAlignment="Right"></TextBox>
  18. <TextBox Width="225" Name="TBoxSearch" TextChanged="TBoxSearch_TextChanged"></TextBox>
  19. </StackPanel>
  20. <StackPanel Orientation="Horizontal">
  21. <TextBox Text="Выберите тип:" Width="175" TextAlignment="Right"></TextBox>
  22. <ComboBox Width="225" Name="ComboType" SelectionChanged="ComboType_SelectionChanged" DisplayMemberPath="Name"></ComboBox>
  23. </StackPanel>
  24. <StackPanel>
  25. <CheckBox x:Name="CheckActual" Checked="CheckActual_Checked" Unchecked="CheckActual_Unchecked" Content="Показывать только актуальные туры" HorizontalAlignment="Center"></CheckBox>
  26. </StackPanel>
  27. </WrapPanel>
  28. <ListView Grid.Row="1" Name="LViewTours" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HorizontalContentAlignment="Center">
  29. <ListView.ItemsPanel>
  30. <ItemsPanelTemplate>
  31. <WrapPanel Orientation="Horizontal" HorizontalAlignment="Center"></WrapPanel>
  32. </ItemsPanelTemplate>
  33. </ListView.ItemsPanel>
  34. <ListView.ItemTemplate>
  35. <DataTemplate>
  36. <Grid Margin="20" Width="400">
  37. <Grid.RowDefinitions>
  38. <RowDefinition Height="70"></RowDefinition>
  39. <RowDefinition Height="310"></RowDefinition>
  40. <RowDefinition Height="auto"></RowDefinition>
  41. <RowDefinition Height="auto"></RowDefinition>
  42. </Grid.RowDefinitions>
  43. <Image Width="400" Grid.Row="1" Stretch="UniformToFill" HorizontalAlignment="Center" Margin="5">
  44. <Image.Source>
  45. <Binding Path="ImagePreview">
  46. <Binding.TargetNullValue>
  47. <ImageSource>H:\3ИС\МДК 05.04\AlekseevMDK05.04Lab6\LR1 05.04\Resources\picture.png</ImageSource>
  48. </Binding.TargetNullValue>
  49. </Binding>
  50. </Image.Source>
  51. </Image>
  52. <TextBlock Text="{Binding Name}" VerticalAlignment="Center" TextAlignment="Center" Width="300"
  53. TextWrapping="Wrap" HorizontalAlignment="Center" Margin="5 5" FontSize="26" Grid.Row="0"></TextBlock>
  54. <TextBlock Text="{Binding Price, StringFormat={}{0:N2} РУБ}" Grid.Row="2" Margin="5 5 5 15" HorizontalAlignment="Center" FontSize="26" FontWeight="Bold"></TextBlock>
  55. <TextBlock Text="{Binding TicketCount, StringFormat={}Билетов осталось: {0}}" Grid.Row="3" FontSize="14" HorizontalAlignment="Right"></TextBlock>
  56. <TextBlock Text="{Binding ActualText}" Grid.Row="3" FontSize="14" HorizontalAlignment="Left"></TextBlock>
  57. </Grid>
  58. </DataTemplate>
  59. </ListView.ItemTemplate>
  60. </ListView>
  61. </Grid>
  62. </Page>