12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <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"
- FontFamily="{StaticResource Comic}">
- <Grid RowDefinitions="*,2.8*">
- <StackPanel Margin="0,10,0,0" Orientation="Vertical" HorizontalAlignment="Center" >
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
- <TextBlock Text="Введите текст для поиска: "/>
- <TextBox Text="{Binding ToursVM.FindTour}" Width="300" Watermark="Поиск по названию и описанию"></TextBox>
- </StackPanel>
- <StackPanel Margin="0,10,0,0" Orientation="Horizontal" VerticalAlignment="Center">
- <TextBlock Text="Выберите тип: "/>
- <ComboBox SelectedIndex="0" ItemsSource="{Binding ToursVM.Types}" Width="300"/>
- </StackPanel>
- <CheckBox IsChecked="{Binding ToursVM.CheckOrNot}" HorizontalAlignment="Center" Content="Только актуальные туры"/>
- </StackPanel>
- <ListBox ItemsSource="{Binding ToursVM.Tours}" Grid.Row="1">
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal" HorizontalAlignment="Center"/>
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Border BorderBrush="Black" BorderThickness="1" Padding="15">
- <Grid>
- <StackPanel Orientation="Vertical" Width="100" Height="150">
- <TextBlock Text="{Binding Name}"/>
- <TextBlock Text="{Binding StringFormat={}{0:#} РУБ , Path=Price}"/>
- <StackPanel>
- <TextBlock Text="{Binding GetActual}"/>
- <TextBlock Text="{Binding StringFormat=Билетов: {0:#}, Path=TicketCount }"/>
- </StackPanel>
- </StackPanel>
- </Grid>
- </Border>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Grid>
-
- </UserControl>
|