12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <UserControl xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
- x:Class="travel.Views.ToursPage"
- xmlns:vm="using:travel.ViewModels"
- x:DataType="vm:MainWindowViewModel">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition Height="3*"/>
- </Grid.RowDefinitions>
- <StackPanel Orientation="Vertical" VerticalAlignment="Center">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="0.9*"/>
- <ColumnDefinition/>
- <ColumnDefinition Width="0.2*"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <TextBlock Text="{Binding TP_VM.AllPrice, StringFormat=Общая сумма: {0}}" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5"/>
- <TextBlock Text="Поиск" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
- <TextBox Text="{Binding TP_VM.Search}" MinWidth="250" Height="30" Grid.Column="1" HorizontalAlignment="Left" Margin="5,2" VerticalAlignment="Center"/>
- <TextBlock Text="Выберите тип" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
- <ComboBox MinWidth="250" ItemsSource="{Binding TP_VM.ListTypes}" SelectedValue="{Binding TP_VM.SelectType}" Height="30" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" Margin="5,2" VerticalAlignment="Center"/>
- <TextBlock Text="Условие сортировки" Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
- <ComboBox MinWidth="250" ItemsSource="{Binding TP_VM.ListSort}" SelectedValue="{Binding TP_VM.SelectSort}" Height="30" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left" Margin="5,2" VerticalAlignment="Center"/>
- <CheckBox Content="Только актуальные" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{Binding TP_VM.ActualCheck}" Margin="5,0,0,0" FontSize="18"/>
- <Button Content="Отели" Grid.Column="2" Margin="10" Command="{Binding GoPageHotel}"/>
- </Grid>
- </StackPanel>
- <ListBox Grid.Row="1" ItemsSource="{Binding TP_VM.ListTours}">
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel HorizontalAlignment="Center"/>
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Border CornerRadius="5" BorderBrush="Black" BorderThickness="2">
- <Grid Width="350" Height="300">
- <StackPanel Orientation="Vertical">
- <TextBlock Text="{Binding Name}" HorizontalAlignment="Center" FontWeight="Bold"/>
- <Image HorizontalAlignment="Center" Source="{Binding Image}" Width="250" Margin="0,10"/>
- <TextBlock Text="{Binding Price, StringFormat={}{0:C}}" HorizontalAlignment="Center"/>
- <Grid ColumnDefinitions="*,*">
- <TextBlock Text="{Binding ActualText}" Foreground="{Binding ActualColor}" Margin="10,0"/>
- <TextBlock Text="{Binding TicketCount, StringFormat=Билетов: {0}}}" TextAlignment="Right" Margin="10,0" Grid.Column="1"/>
- </Grid>
- </StackPanel>
- </Grid>
- </Border>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Grid>
- </UserControl>
|