123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <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="UPtur.Views.Tours"
- xmlns:vm="using:UPtur.ViewModels"
- x:DataType="vm:MainWindowViewModel"
- FontFamily="Comic Sans MS">
- <Grid Background="#bae3e8" RowDefinitions="*,2.0*">
- <StackPanel Margin="0,10,0,10" Orientation="Vertical" HorizontalAlignment="Center" >
- <StackPanel Orientation="Vertical" VerticalAlignment="Center">
- <TextBlock Text="Введите текст для поиска: "/>
- <TextBox Text="{Binding ToursVM.FindTour}" Width="300" Watermark="Поиск по названию"></TextBox>
- </StackPanel>
- <StackPanel Margin="0,10,0,0" Orientation="Vertical" VerticalAlignment="Center">
- <TextBlock Margin="0,0,0,0" Text="Выберите тип: "/>
- <ComboBox SelectedIndex="0" SelectedItem="{Binding ToursVM.SelectedItem}" ItemsSource="{Binding ToursVM.Types}" Width="300"/>
- </StackPanel>
- <StackPanel HorizontalAlignment="Center" Margin="0,10,0,0" Orientation="Vertical" VerticalAlignment="Center">
- <TextBlock VerticalAlignment="Center" Text="Выберите сортировку: "/>
- <ComboBox SelectedIndex="0" SelectedItem="{Binding ToursVM.SelectedSort}" ItemsSource="{Binding ToursVM.Sort}" Width="300"/>
- </StackPanel>
- <CheckBox IsChecked="{Binding ToursVM.CheckOrNot}" HorizontalAlignment="Left" Content="Только актуальные туры"/>
- </StackPanel>
- <ListBox Background="#bae3e8" ItemsSource="{Binding ToursVM.Tours}" Grid.Row="1">
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal" HorizontalAlignment="Center"/>
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Border Width="300" Height="270" BorderBrush="Black" BorderThickness="1" Padding="5">
- <StackPanel Orientation="Vertical" VerticalAlignment="Center">
- <TextBlock Margin="0 0 0 5" TextWrapping="Wrap" FontSize="19" TextAlignment="Center" HorizontalAlignment="Center" Text="{Binding Name}"></TextBlock>
- <Image HorizontalAlignment="Center" Width="270" Height="150" Source="{Binding GetPic}"/>
- <TextBlock Margin="5" FontSize="20" FontWeight="ExtraBold" HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding StringFormat={}{0:#} РУБ, Path=Price}"></TextBlock>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
- <StackPanel HorizontalAlignment="Left" Margin="0 0 25 0">
-
- </StackPanel>
- <StackPanel HorizontalAlignment="Right" Margin="25 0 0 0">
- <TextBlock FontSize="16" Text="{Binding StringFormat=Билетов: {0:#}, Path=TicketCount}"></TextBlock>
- </StackPanel>
- <TextBlock HorizontalAlignment="Left" FontSize="15" Foreground="{Binding Color}" Text="{Binding Actual}"/>
- </StackPanel>
- </StackPanel>
- </Border>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <StackPanel VerticalAlignment="Top" Margin="10,26,10,10">
- <Button Background="#445c93" Width="120" Height="35" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Command="{Binding Navigate}" Content="Назад"/>
- </StackPanel>
- </Grid>
-
- </UserControl>
|