1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <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="1000" d:DesignHeight="450"
- xmlns:views="using:AvaloniaApplicationTest.Views"
- xmlns:vm="using:AvaloniaApplicationTest.ViewModels"
- x:DataType="vm:MainWindowViewModel"
- x:Class="AvaloniaApplicationTest.Views.TourPage">
- <UserControl.Resources>
- <Image x:Key="default" Source="/Assets/img/picture.png"/>
- </UserControl.Resources>
- <Grid>
- <ScrollViewer>
- <StackPanel>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,10,130,0">
- <TextBlock Text="Введите текст для поиска:" Margin="0,6,0,0"/>
- <TextBox Text="{Binding PageTours.SearchText}" Width="300" Height="20" Margin="20,0,0,0"/>
- <TextBlock Text="{Binding PageTours.AllPrice, StringFormat=Всего: {0:N2} РУБ}" Width="200" FontSize="14" Foreground="#fac716" HorizontalAlignment="Left" Margin="20,0,-50,0"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,10,189,0">
- <TextBlock Text="Выберите тип:" Margin="0,6,0,0"/>
- <ComboBox ItemsSource="{Binding PageTours.CBTypes}" SelectedValue="{Binding PageTours.ValueSelected}" Width="300" Margin="10,0,0,0" />
- <Button Content="Перейти к отелям" Command="{Binding ToHotels}" Margin="30,0,-80,0"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,10,300,0">
- <TextBlock Text="Условия сортировки стоимости:" Margin="0,3,0,0"/>
- <ComboBox Width="300" Margin="10,0,0,0" ItemsSource="{Binding PageTours.CBTypesSort}" SelectedValue="{Binding PageTours.ValueSelectedSort}"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,10,300,0">
- <TextBlock Text="Только актуальные туры:" Margin="0,3,0,0"/>
- <CheckBox IsChecked="{Binding PageTours.SelectedActual}" Margin="10,0,0,0" />
- </StackPanel>
-
- <ListBox ItemsSource="{Binding PageTours.LBTours}">
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel HorizontalAlignment="Center"/>
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Border BorderBrush="#fac716" BorderThickness="1" Width="300" Height="300">
- <StackPanel>
- <TextBlock Text="{Binding Name}" HorizontalAlignment="Center" Margin="0,10,0,0" TextWrapping="Wrap" TextAlignment="Center"/>
- <Border BorderBrush="#fac716" BorderThickness="1" Width="250" Height="150" Margin="0,20,0,0">
- <Image Source="{Binding ImagePreview, TargetNullValue={StaticResource default}}" HorizontalAlignment="Center" Width="250" Height="150"/>
- </Border>
- <TextBlock Text="{Binding Price, StringFormat={}{0:N2} РУБ}" HorizontalAlignment="Center" Margin="0,10,0,0"/>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,10,0,0">
- <TextBlock Text="{Binding Status}" Foreground="{Binding ActualColor}"/>
- <TextBlock Text="{Binding TicketCount, StringFormat=Билетов: {0}}" Margin="90,0,0,0"/>
- </StackPanel>
- </StackPanel>
- </Border>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- </ScrollViewer>
- </Grid>
- </UserControl>
|