123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <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:DataType="vm:MainWindowViewModel"
- xmlns:vm="using:UPtur.ViewModels"
- x:Class="UPtur.Views.Hotels">
- <Grid RowDefinitions="*,14*">
- <Border Background="" BorderThickness="" >
- <StackPanel Grid.Row="0" Width="800" HorizontalAlignment="Center" Orientation="Horizontal">
- <TextBlock Text="Название отеля"/>
- <TextBlock Margin="20,0,0,0" Text="Количество звёзд"/>
- <TextBlock Margin="20,0,0,0" Text="Название страны"/>
- <TextBlock Margin="20,0,0,0" Text="Количество туров "/>
- <TextBlock Margin="20,0,0,0" Text="Количество отелей:"/>
- <ComboBox ItemsSource="{Binding HotelsVM.SelectedCountOfElements}" SelectedItem="{Binding HotelsVM.CountElements}" Margin="30,0,0,0" />
- </StackPanel>
- </Border>
-
- <ListBox SelectionMode="Multiple" SelectedItems="{Binding HotelsVM.SelectedHotels}" ItemsSource="{Binding HotelsVM.Hotels}" Grid.Row="1">
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Vertical" HorizontalAlignment="Center"/>
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Border HorizontalAlignment="Center" BorderBrush="Black" BorderThickness="1" Padding="15">
- <Grid HorizontalAlignment="Center">
- <StackPanel Width="800" Orientation="Horizontal" HorizontalAlignment="Center">
- <Grid Width="800" ColumnDefinitions="*,*,*,*,1*">
- <TextBlock Grid.Column="0" Text="{Binding Name}"/>
- <TextBlock Grid.Column="1" Margin="20,0,0,0" Text="{Binding CountOfStars}"/>
- <TextBlock Grid.Column="2" Margin="0,0,0,0" Text="{Binding CountryName}"/>
- <TextBlock Grid.Column="3" Margin="0,0,0,0" Text="{Binding AmountTours}"/>
- <StackPanel Grid.Column="4" HorizontalAlignment="Center">
-
-
- </StackPanel>
- </Grid>
- </StackPanel>
- </Grid>
- </Border>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <StackPanel Margin="10,0,0,10" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Bottom" Grid.Row="1">
- <Button Background="#445c93" IsEnabled="{Binding HotelsVM.EnableOrNotLeft}" Command="{Binding HotelsVM.ToFirstPage}" FontSize="15" Content="Начало"/>
- <Button Background="#445c93" IsEnabled="{Binding HotelsVM.EnableOrNotLeft}" Command="{Binding HotelsVM.PrevPage}" Margin="10,0,0,0" FontSize="15" Content="Предыдущая"/>
- </StackPanel>
- <StackPanel Margin="0,0,10,10" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Grid.Row="1">
- <Button Background="#445c93" IsEnabled="{Binding HotelsVM.EnableOrNotRight}" Command="{Binding HotelsVM.NextPage}" Margin="0,0,10,0" FontSize="15" Content="Следующая"/>
- <Button Background="#445c93" IsEnabled="{Binding HotelsVM.EnableOrNotRight}" Command="{Binding HotelsVM.ToLastPage}" FontSize="15" Content="Конец"/>
- </StackPanel>
- <StackPanel Margin="0,0,0,10" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Grid.Row="1">
- <Button Background="#445c93" Content="Назад" Command="{Binding ToMenu}"/>
- </StackPanel>
- <StackPanel Margin="10,0,0,0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Grid.Row="1">
-
- </StackPanel>
- <StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Center">
- <Button Margin="240,30,0,10" Background="#fac716" Width="130" HorizontalContentAlignment="Center" Content="Удалить"/>
- </StackPanel>
- </Grid>
- </UserControl>
|