ListTourPage.xaml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <Page x:Class="ПодготовкаКДемо1.Pages.ListTourPage"
  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:ПодготовкаКДемо1.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="ListTourPage">
  10. <Page.Resources>
  11. <DataTemplate x:Key="ListItem">
  12. <Border BorderBrush="Black" BorderThickness="1" Width="150" Height="150">
  13. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  14. <TextBlock Text="{Binding Name}" TextWrapping="Wrap"/>
  15. <Image Width="50" Height="50" Source="{Binding ImageTour}"/>
  16. <StackPanel Orientation="Horizontal">
  17. <TextBlock Text="{Binding PriceTour}" />
  18. <TextBlock Text=" РУБ"/>
  19. </StackPanel>
  20. <StackPanel Orientation="Horizontal">
  21. <TextBlock Text="{Binding IsActualTour}" Foreground="{Binding IsActualTourColor}"/>
  22. <TextBlock Margin="10 0 0 0" Text="Билетов: "/>
  23. <TextBlock Text="{Binding TicketCount}"/>
  24. </StackPanel>
  25. </StackPanel>
  26. </Border>
  27. </DataTemplate>
  28. </Page.Resources>
  29. <Grid>
  30. <Grid.RowDefinitions>
  31. <RowDefinition Height="1*"/>
  32. <RowDefinition Height="2*"/>
  33. </Grid.RowDefinitions>
  34. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  35. <StackPanel Orientation="Vertical">
  36. <TextBlock Text="Введите текст для поиска:" Style="{StaticResource TextBlock}"/>
  37. <TextBlock Text="Выберите тип:" Style="{StaticResource TextBlock}"/>
  38. <TextBlock x:Name="AllPrice" Style="{StaticResource TextBlock}"/>
  39. </StackPanel>
  40. <StackPanel Orientation="Vertical">
  41. <TextBox Name="TextBoxSearch" Margin="5" Width="150" TextChanged="TextBoxSearch_TextChanged" Style="{StaticResource TextBox}"/>
  42. <ComboBox Name="ComboBoxSelectType" Margin="5" Width="150" SelectionChanged="ComboBoxSelectType_SelectionChanged" Style="{StaticResource ComboBox}"/>
  43. <CheckBox Content="только актуальные туры" x:Name="CheckBoxIsActual" Checked="CheckBoxIsActual_Checked" Unchecked="CheckBoxIsActual_Checked" Style="{StaticResource CheckBox}"/>
  44. <RadioButton x:Name="RadioUp" Content="По возрастанию" Checked="RadioButton_Checked" Style="{StaticResource RadioButton}"/>
  45. <RadioButton Name="RadioDown" Content="По убыванию" Checked="RadioButton_Checked_1" Style="{StaticResource RadioButton}"/>
  46. </StackPanel>
  47. </StackPanel>
  48. <ListBox x:Name="ListTours" ItemTemplate="{StaticResource ListItem}" Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  49. <ListBox.ItemsPanel>
  50. <ItemsPanelTemplate>
  51. <WrapPanel Orientation="Horizontal"/>
  52. </ItemsPanelTemplate>
  53. </ListBox.ItemsPanel>
  54. </ListBox>
  55. </Grid>
  56. </Page>