<Window x:Class="R7_DataGrid_XML.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:R7_DataGrid_XML"
        mc:Ignorable="d"
        Title="Edycja produktów z pliku XML" Height="210" Width="360">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <DataGrid x:Name="gridProdukty" AutoGenerateColumns="False" Margin ="10" AlternatingRowBackground="Lavender" GridLinesVisibility="None"
              Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding Path=Elements[Produkt]}">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Symbol" Binding="{Binding Element[Symbol].Value}" />
                <DataGridTextColumn Header="Nazwa" Binding="{Binding Element[Nazwa].Value}"/>
                <DataGridTextColumn Header="Liczba sztuk" Binding="{Binding Element[LiczbaSztuk].Value}"/>
                <DataGridComboBoxColumn x:Name="nazwaMagazynu" Header="Magazyn" SelectedItemBinding="{Binding Element[Magazyn].Value}"/>
            </DataGrid.Columns>
        </DataGrid>
        <Button Grid.Row="1" Grid.Column="1" Margin ="5" MinWidth="120" HorizontalAlignment="Right" Height="30" 
                Content="Zapisz" Click="btnZapisz_Click" />
    </Grid>
   
</Window>
