<Window x:Class="WPF_LibrosFamosos.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:WPF_LibrosFamosos"
        mc:Ignorable="d"
        Title="MainWindow" Height="385" Width="760" Loaded="Window_Loaded" Icon="bookshelf.png">
    <DockPanel Background="LightBlue" Margin="5">

        <DockPanel DockPanel.Dock="Top" Background="White" Margin="5"  >
            <Image Width="70" Source="bookshelf.png"></Image>
            <StackPanel DockPanel.Dock="Top">
                <Label HorizontalAlignment="Center"  FontFamily="Freestyle script"  Foreground="RoyalBlue" FontWeight="Bold" FontSize="33">Libros famosos</Label>
                <Label HorizontalAlignment="Center" >Listado de autores famosos, sus libros  y reseñas de los mismos</Label>
            </StackPanel>
        </DockPanel>
        <StackPanel DockPanel.Dock="Left" Width="250">
            <DockPanel DockPanel.Dock="Left" Background="White" Margin="5,2">
                <Label FontSize="18" Height="30" Background="White" Margin="5" FontWeight="Bold" HorizontalContentAlignment="Center">AUTORES</Label>
                <WrapPanel HorizontalAlignment="Right">
                    <Button Margin="4" Width="35" Height="35" Name="btnAgregar" Click="btnAgregar_Click">
                        <Image Width="32" Source="add.png"></Image>
                    </Button>
                    <Button Margin="4" Width="35" Height="35" Name="btnEditar" Click="btnEditar_Click">
                        <Image Width="32" Source="update.png"></Image>
                    </Button>
                    <Button Margin="5" Width="35" Height="35" Name="btnEliminar" Click="btnEliminar_Click">
                        <Image Width="32" Source="remove.png"></Image>
                    </Button>
                </WrapPanel>
            </DockPanel>
            <ListBox Name="lstAutores" Height="200" Margin="5" SelectionChanged="lstAutores_SelectionChanged" ScrollViewer.VerticalScrollBarVisibility="Auto"></ListBox>
        </StackPanel>
        <StackPanel>
            <DockPanel Background="White" Margin="5,2">
                <Button Width="35" Height="35" DockPanel.Dock="Right" Margin="5" Name="btnAgregarLibro" Click="btnAgregarLibro_Click">
                    <Image Width="32" Source="addbook.png"></Image>
                </Button>
                <Label Height="30" Background="White" Margin="5" FontWeight="Bold" HorizontalContentAlignment="Center" FontSize="18">OBRAS</Label>
            </DockPanel>
            <DataGrid Margin="5" MinHeight="150" Height="200" Name="dtgObras" AutoGenerateColumns="False"
                      CanUserAddRows="False" CanUserDeleteRows="False"
                      CanUserResizeColumns="False"
                      CanUserResizeRows="False" HeadersVisibility="Column">
                <DataGrid.Columns>
                    <DataGridTextColumn Header="Título" Width=".34*" Binding="{Binding Titulo}"></DataGridTextColumn>
                    <DataGridTextColumn Header="Género" Width=".3*" Binding="{Binding Genero}"></DataGridTextColumn>
                    <DataGridTemplateColumn Header="Accion" Width=".12*">
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Image Width="20" Name="btnInformation" Source="information.png" MouseLeftButtonDown="btnInformation_MouseLeftButtonDown"></Image>
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
                    <DataGridTemplateColumn Header="Accion" Width=".12*">
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Image Width="20" Name="ImgEditar" Source="edit.png" MouseLeftButtonDown="ImgEditar_MouseLeftButtonDown"></Image>
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
                    <DataGridTemplateColumn Header="Accion" Width=".12*">
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Image Width="20" Name="imgEliminar" Source="delete.png" MouseLeftButtonDown="imgEliminar_MouseLeftButtonDown"></Image>
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
                </DataGrid.Columns>
            </DataGrid>
        </StackPanel>
        
    </DockPanel>
</Window>
