pgTours.xaml 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <Page x:Class="WpfApp1.pgTours"
  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:WpfApp1"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="pgTours">
  10. <Page.Resources>
  11. <DataTemplate x:Key="dtTours">
  12. <Border BorderThickness="1,1,1,1" BorderBrush="Black" Width="250px" Height="250px" >
  13. <StackPanel Width="250px" Height="250px">
  14. <TextBlock Text="{Binding Name}" HorizontalAlignment="Center"></TextBlock>
  15. <Image Source="{Binding ToutImage}" Width="150px" Height="150px"></Image>
  16. <TextBlock Text="{Binding Price}" HorizontalAlignment="Center"></TextBlock>
  17. <DockPanel Width="240px">
  18. <TextBlock Text="{Binding IsActualStr}" Foreground="{Binding IsActualClor}" HorizontalAlignment="Left"></TextBlock>
  19. <TextBlock HorizontalAlignment="Right">
  20. <Run Text="Билетов: "></Run>
  21. <Run Text="{Binding TicketCount}"></Run>
  22. </TextBlock>
  23. </DockPanel>
  24. </StackPanel>
  25. </Border>
  26. </DataTemplate>
  27. </Page.Resources>
  28. <Grid>
  29. <Grid.RowDefinitions>
  30. <RowDefinition Height="47*"/>
  31. <RowDefinition Height="188*"/>
  32. </Grid.RowDefinitions>
  33. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  34. <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
  35. <StackPanel>
  36. <StackPanel Orientation="Horizontal">
  37. <TextBlock Text="Введите текст для поиска: "></TextBlock>
  38. <TextBox Name="tbName" MinWidth="100px" TextChanged="tbName_TextChanged"></TextBox>
  39. </StackPanel>
  40. <StackPanel Orientation="Horizontal">
  41. <TextBlock Text="Выберите тип: "></TextBlock>
  42. <ComboBox Name="cbType" MinWidth="100px" SelectionChanged="cbType_SelectionChanged"></ComboBox>
  43. </StackPanel>
  44. <StackPanel Orientation="Horizontal">
  45. <TextBlock Text="Сортировка цены: "></TextBlock>
  46. <ComboBox MinWidth="100px" Name="cbSort" SelectionChanged="cbSort_SelectionChanged">
  47. <ComboBoxItem>Сбросить</ComboBoxItem>
  48. <ComboBoxItem>По возрастанию</ComboBoxItem>
  49. <ComboBoxItem>По убыванию</ComboBoxItem>
  50. </ComboBox>
  51. </StackPanel>
  52. <CheckBox Content="Только актуальные туры" Name="chbIsActual" Checked="chbIsActual_Checked" Unchecked="chbIsActual_Unchecked"></CheckBox>
  53. </StackPanel>
  54. <Button Name="btnHotel" Click="btnHotel_Click">Отели</Button>
  55. </StackPanel>
  56. <TextBlock Text="Общая цена туров: ">
  57. <Run Name="rSummPrice"></Run>
  58. </TextBlock>
  59. </StackPanel>
  60. <ListBox Grid.Row="1" ItemTemplate="{StaticResource dtTours}" ScrollViewer.HorizontalScrollBarVisibility ="Disabled" Name="lbTours">
  61. <ListBox.ItemsPanel>
  62. <ItemsPanelTemplate>
  63. <WrapPanel Orientation="Horizontal"></WrapPanel>
  64. </ItemsPanelTemplate>
  65. </ListBox.ItemsPanel>
  66. </ListBox>
  67. </Grid>
  68. </Page>