<Window x:Class="BookStore.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:BookStore"
        mc:Ignorable="d"
        Title="Book Store Data Base App" Height="450" Width="800">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="50"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <DataGrid Grid.Row="1" SelectionChanged="BooksGrid_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 Autor}"></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="Left" VerticalAlignment="Top" Margin="72,33,0,0"></TextBlock>
            <TextBlock Text="Цена" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" Margin="72,38,0,0"></TextBlock>
            <TextBlock Text="Категория" HorizontalAlignment="Center" VerticalAlignment="Top" Grid.Row="2" Margin="0,35,0,0"></TextBlock>
            <TextBlock Text="Автор" HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Row="3" Margin="0,32,95,0"></TextBlock>
            <TextBox VerticalAlignment="Top" Name="TbName" Grid.ColumnSpan="2" Margin="190,28,10,0"/>
            <TextBox VerticalAlignment="Center" Name="TbPrice" Grid.Row="1" Grid.ColumnSpan="2" Margin="190,0,10,0"/>
            <TextBox VerticalAlignment="Top" Name="TbCategory" Grid.Row="2" Grid.ColumnSpan="2" Margin="190,33,10,0"/>
            <TextBox VerticalAlignment="Center" Name="TbAutor" Grid.Row="3" Grid.ColumnSpan="2" Margin="190,0,10,0"/>
            <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>
