<Window x:Class="WpfApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        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"
        xmlns:local="clr-namespace:WpfApp1"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="50"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <DataGrid Grid.Row="1" SelectionChanged="BookGrid_SelectionChanged" Name="BooksGrid" AutoGenerateColumns="False" IsReadOnly="True" ColumnWidth="*">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Наименование" Binding="{Binding Name}"></DataGridTextColumn>
                <DataGridTextColumn Header="Цена" Binding="{Binding Price}"></DataGridTextColumn>
                <DataGridTextColumn Header="Категория" Binding="{Binding Category}"></DataGridTextColumn>
                <DataGridTextColumn Header="Автор" Binding="{Binding Author}"></DataGridTextColumn>
            </DataGrid.Columns>
        </DataGrid>
        <Button Height="30" Width="150" Name="BtnDelete" Click="BtnDelete_Click" HorizontalAlignment="Left" Content="Удалить"></Button>
        <Grid Grid.Column="1" Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <TextBlock Text="Наименование" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>
            <TextBlock Text="Цена" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="1"></TextBlock>
            <TextBlock Text="Категория" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="2"></TextBlock>
            <TextBlock Text="Автор" HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Row="3"></TextBlock>
            <TextBox Grid.Column="1" VerticalAlignment="Center" Name="TbName"></TextBox>
            <TextBox Grid.Column="1" VerticalAlignment="Center" Name="TbPrice" Grid.Row="1"></TextBox>
            <TextBox Grid.Column="1" VerticalAlignment="Center" Name="TbCategory" Grid.Row="2"></TextBox>
            <TextBox Grid.Column="1" VerticalAlignment="Center" Name="TbAuthor" Grid.Row="3"></TextBox>
            <Button Grid.Row="4" Name="BtnInsert" Click="BtnInsert_Click" Height="30" Width="150" Content="Добавить"></Button>
            <Button Grid.Column="1" Grid.Row="4" Name="BtnUpdate" Click="BtnUpdate_Click" Height="30" Width="150" Content="Обновить"></Button>
        </Grid>
    </Grid>
</Window>