123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <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="TourAgent.Views.Tours"
- xmlns:vm="using:TourAgent.ViewModels"
- x:DataType="vm:MainWindowViewModel"
- Background="#878787"
- FontFamily="{StaticResource Comic}">
- <Grid RowDefinitions="*,2.9*" >
- <StackPanel Margin="0,10,0,15" Orientation="Vertical" HorizontalAlignment="Stretch" >
- <Button HorizontalContentAlignment="Right" VerticalContentAlignment="Top" Command="{Binding ToMenu}" Content="Меню"/>
- <TextBlock Margin="0,0,10,0" HorizontalAlignment="Right" Text="{Binding StringFormat=Общая стоимость туров {0:C}, Path=ToursVM.PriceOfAll}"/>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
- <TextBlock VerticalAlignment="Center" Text="Поиск: " />
- <TextBox Text="{Binding ToursVM.FindTour}" Width="300" Watermark="Поиск по названию и описанию"></TextBox>
- </StackPanel>
- <StackPanel HorizontalAlignment="Right" Margin="0,10,0,0" Orientation="Horizontal" VerticalAlignment="Center">
- <TextBlock VerticalAlignment="Center" Text="Тип: "/>
- <ComboBox SelectedIndex="0" SelectedItem="{Binding ToursVM.SelectedItem}" ItemsSource="{Binding ToursVM.Types}" Width="300"/>
- </StackPanel>
- <StackPanel HorizontalAlignment="Right" Margin="0,10,0,0" Orientation="Horizontal" VerticalAlignment="Center">
- <TextBlock VerticalAlignment="Center" />
- <ComboBox SelectedIndex="0" SelectedItem="{Binding ToursVM.SelectedSort}" ItemsSource="{Binding ToursVM.Sort}" Width="300"/>
- </StackPanel>
- <CheckBox IsChecked="{Binding ToursVM.CheckOrNot}" HorizontalAlignment="Right" Content="Актуальные туры"/>
- </StackPanel>
- <ListBox ItemsSource="{Binding ToursVM.Tours}" Grid.Row="1" Background="#878787">
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal" HorizontalAlignment="Center"/>
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Border HorizontalAlignment="Stretch" BorderBrush="Black" Background="#bae3e8" BorderThickness="1" Padding="15">
- <Grid HorizontalAlignment="Stretch">
- <StackPanel HorizontalAlignment="Stretch" Orientation="Vertical" Width="300" Height="250">
- <TextBlock FontSize="18" HorizontalAlignment="Center" Text="{Binding Name}"/>
-
- <TextBlock FontWeight="Bold" FontSize="18" HorizontalAlignment="Center" Text="{Binding StringFormat={}{0:#} РУБ , Path=Price}"/>
- <StackPanel Margin="0,10,0,0" Orientation="Horizontal" HorizontalAlignment="Center">
- <StackPanel HorizontalAlignment="Left">
- <TextBlock HorizontalAlignment="Left" FontSize="15" Foreground="{Binding GetColor}" Text="{Binding GetActual}"/>
- </StackPanel>
- <StackPanel Margin="120,0,0,0" HorizontalAlignment="Right" >
- <TextBlock FontSize="15" HorizontalAlignment="Right" Text="{Binding StringFormat=Билетов: {0:#}, Path=TicketCount }"/>
- </StackPanel>
- </StackPanel>
- </StackPanel>
- </Grid>
- </Border>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
-
- </Grid>
-
- </UserControl>
|