<Window x:Class="TwoDecksWPF.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:TwoDecksWPF"
        mc:Ignorable="d"
        Title="Dwie talie" Height="450" Width="400" >

    <Window.Resources>
        <local:Deck x:Key="leftDeck"/>
        <local:Deck x:Key="rightDeck"/>
    </Window.Resources>

    <Grid>

        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition/>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Label x:Name="deck1Label" Content="Talia _1" 
               Margin="10,0,0,0" Target="{Binding ElementName=leftDeckListBox, Mode=OneWay}"/>
        <Label x:Name="deck2Label" Content="Talia _2" Grid.Column="1" Margin="10,0,0,0"
               Target="{Binding ElementName=rightDeckListBox, Mode=OneWay}"/>

        <ListBox x:Name="leftDeckListBox" Grid.Row="1" Margin="10,0,10,10"
            ItemsSource="{DynamicResource leftDeck}" 
            KeyDown="leftDeckListBox_KeyDown" />
        <ListBox x:Name="rightDeckListBox" Grid.Row="1" Grid.Column="1"
            Margin="10,0,10,10" ItemsSource="{DynamicResource rightDeck}" 
            KeyDown="leftDeckListBox_KeyDown" />
        
        <Button x:Name="shuffleLeftDeck" Content="_Tasuj" Grid.Row="2"
                Margin="10,0,10,10" Click="shuffleLeftDeck_Click" />
        <Button x:Name="clearRightDeck" Content="_Zeruj" Grid.Row="2" Grid.Column="1" 
                Margin="10,0,10,10" Click="clearRightDeck_Click" />
        <Button x:Name="resetLeftDeck" Content="_Resetuj" Grid.Row="3" 
                Margin="10,0,10,10" Click="resetLeftDeck_Click" />
        <Button x:Name="sortRightDeck" Content="_Sortuj" Grid.Row="3" Grid.Column="1" 
                Margin="10,0,10,10" Click="sortRightDeck_Click" />
    </Grid>
</Window>