<Page x:Class="LR1_05._04.HotelsPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:LR1_05._04"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800"
      Title="HotelsPage">

    <Grid>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="377*"/>
            <RowDefinition Height="50*"/>
        </Grid.RowDefinitions>
        <DataGrid x:Name="DGridHotels" AutoGenerateColumns="False" IsReadOnly="True">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Название отеля" Binding="{Binding Name}" Width="*"></DataGridTextColumn>
                <DataGridTextColumn Header="Количество звезд" Binding="{Binding CountOfStars}" Width="150"></DataGridTextColumn>
                <DataGridTextColumn Header="Страна" Binding="{Binding Country.Name}" Width="250"></DataGridTextColumn>
                <DataGridTemplateColumn Width="auto">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Button Content="Редактировать" Name="BtnEdit" Click="BtnEdit_Click"></Button>
                            
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>
        </DataGrid>

        <Button Content="Добавить" Grid.Row="1" HorizontalAlignment="Left" Name="BtnAdd" Click="BtnAdd_Click"></Button>
        <Button Content="Удалить" Grid.Row="1" HorizontalAlignment="Right" Name="BtnDelete" Click="BtnDelete_Click"></Button>
        
    </Grid>
</Page>
