<Page x:Class="ПодготовкаКДемо1.Pages.ListTourPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:ПодготовкаКДемо1.Pages"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800"
      Title="ListTourPage">
    <Page.Resources>
        <DataTemplate x:Key="ListItem">
            <Border BorderBrush="Black" BorderThickness="1" Width="150" Height="150">
                <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
                    <TextBlock Text="{Binding Name}" TextWrapping="Wrap"/>
                    <Image Width="50" Height="50" Source="{Binding ImageTour}"/>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding PriceTour}" />
                        <TextBlock Text=" РУБ"/>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding IsActualTour}" Foreground="{Binding IsActualTourColor}"/>
                        <TextBlock Margin="10 0 0 0" Text="Билетов: "/>
                        <TextBlock Text="{Binding TicketCount}"/>
                    </StackPanel>
                </StackPanel>
            </Border>
           
        </DataTemplate>
    </Page.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="2*"/>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                <StackPanel Orientation="Vertical">
                <TextBlock Text="Введите текст для поиска:" Style="{StaticResource TextBlock}"/>
                <TextBlock Text="Выберите тип:" Style="{StaticResource TextBlock}"/>
                <TextBlock x:Name="AllPrice" Style="{StaticResource TextBlock}"/>
            </StackPanel>
                <StackPanel Orientation="Vertical">
                <TextBox Name="TextBoxSearch" Margin="5" Width="150" TextChanged="TextBoxSearch_TextChanged" Style="{StaticResource TextBox}"/>
                <ComboBox Name="ComboBoxSelectType" Margin="5" Width="150" SelectionChanged="ComboBoxSelectType_SelectionChanged" Style="{StaticResource ComboBox}"/>
                <CheckBox Content="только актуальные туры" x:Name="CheckBoxIsActual" Checked="CheckBoxIsActual_Checked" Unchecked="CheckBoxIsActual_Checked" Style="{StaticResource CheckBox}"/>
                <RadioButton x:Name="RadioUp" Content="По возрастанию" Checked="RadioButton_Checked" Style="{StaticResource RadioButton}"/>
                <RadioButton Name="RadioDown" Content="По убыванию" Checked="RadioButton_Checked_1" Style="{StaticResource RadioButton}"/>
            </StackPanel>
            </StackPanel>

        <ListBox x:Name="ListTours" ItemTemplate="{StaticResource ListItem}" Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel Orientation="Horizontal"/>
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
        </ListBox>
    </Grid>
</Page>
