<local:ContextWindow
        x:Class="Elwig.Windows.OriginHierarchyWindow"
        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:Elwig.Windows"
        mc:Ignorable="d"
        Title="Herkunftshierarchie - Elwig" Height="800" Width="1200" MinHeight="500" MinWidth="1000">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*" MinWidth="300"/>
            <ColumnDefinition Width="25"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="25"/>
            <ColumnDefinition Width="1*" MinWidth="400"/>
            <ColumnDefinition Width="25"/>
            <ColumnDefinition Width="1*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="25"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="25"/>
        </Grid.RowDefinitions>

        <Label Content="Weinbaugebiete" Margin="10,0,0,0" VerticalAlignment="Top" Grid.RowSpan="3"/>
        <ListBox x:Name="WineOrigins" Margin="10,25,0,10" Grid.RowSpan="3"
                 ItemTemplate="{StaticResource WineOriginTemplate}"
                 SelectionChanged="WineOrigins_SelectionChanged"/>

        <Label Content="Großlagen" Margin="0,0,0,0" VerticalAlignment="Top" Grid.Column="2"/>
        <ListBox x:Name="WbGls" Margin="0,25,0,5" Grid.Column="2"
                 DisplayMemberPath="Name"
                 SelectionChanged="WbGls_SelectionChanged"/>

        <Label Content="&#xF0AF;" FontFamily="Segoe MDL2 Assets" FontSize="16" Padding="0" Grid.Row="2" Grid.Column="1"
               VerticalAlignment="Center" HorizontalAlignment="Center"/>
        <Label x:Name="WbGemsHeader" Content="Gemeinden" Margin="0,0,0,0" VerticalAlignment="Top" Grid.Column="2" Grid.Row="2"/>
        <ListBox x:Name="WbGems" Margin="0,25,0,10" Grid.Column="2" Grid.Row="2"
                 ItemTemplate="{StaticResource GemTemplate}" TextSearch.TextPath="Name"
                 SelectionChanged="WbGems_SelectionChanged"/>

        <Label Content="&#xF0AF;" FontFamily="Segoe MDL2 Assets" FontSize="16" Padding="0" Grid.Column="3"
               VerticalAlignment="Center" HorizontalAlignment="Center"/>
        <Label x:Name="WbGlKgsHeader" Content="Aktive KG" Margin="0,0,0,0" VerticalAlignment="Top" Grid.Column="4"/>
        <Label Content="Weinbaugebiet" Margin="250,0,0,0" VerticalAlignment="Top" Grid.Column="4" Background="White"/>
        <ListBox x:Name="WbGlKgs" Margin="0,25,0,5" Grid.Column="4"
                 ItemTemplate="{StaticResource WbKgTemplate}" TextSearch.TextPath="Name"
                 SelectionChanged="WbGlKgs_SelectionChanged"/>

        <Button x:Name="ActivateKgButton" Content="&#xF0AD;" Grid.Column="4" Grid.Row="1" Height="25" Width="25" Margin="0,0,30,0"
                FontFamily="Segoe MDL2 Assets" FontSize="14"
                Click="ActivateKgButton_Click"
                VerticalAlignment="Center" HorizontalAlignment="Center"/>
        <Button x:Name="DeactivateKgButton" Content="&#xF0AE;" Grid.Column="4" Grid.Row="1" Height="25" Width="25" Margin="30,0,0,0"
                FontFamily="Segoe MDL2 Assets" FontSize="14"
                Click="DeactivateKgButton_Click"
                VerticalAlignment="Center" HorizontalAlignment="Center"/>

        <Label Content="&#xF0AF;" FontFamily="Segoe MDL2 Assets" FontSize="16" Padding="0" Grid.Row="2" Grid.Column="3"
               VerticalAlignment="Center" HorizontalAlignment="Center"/>
        <Label x:Name="WbKgsHeader" Content="Verfügbare KG" Margin="0,0,0,0" VerticalAlignment="Top" Grid.Column="4" Grid.Row="2"/>
        <Label Content="Zugewiesen zu Großlage" Margin="220,0,0,0" VerticalAlignment="Top" Grid.Column="4" Grid.Row="2" Background="White"/>
        <ListBox x:Name="WbKgs" Margin="0,25,0,10" Grid.Column="4" Grid.Row="2"
                 ItemTemplate="{StaticResource WbKgGlTemplate}" TextSearch.TextPath="Name"
                 SelectionChanged="WbKgs_SelectionChanged"/>

        <Label Content="&#xF0AF;" FontFamily="Segoe MDL2 Assets" FontSize="16" Padding="0" Grid.Column="5"
               VerticalAlignment="Center" HorizontalAlignment="Center"/>
        <Label x:Name="WbRdsHeader" Content="Riede" Margin="0,0,0,0" VerticalAlignment="Top" Grid.Column="6" Grid.RowSpan="3"/>
        <ListBox x:Name="WbRds" Margin="0,25,10,10" Grid.Column="6" Grid.RowSpan="3"
                 DisplayMemberPath="Name" TextSearch.TextPath="Name"/>

        <StatusBar Grid.Row="3" Grid.ColumnSpan="7" BorderThickness="0,1,0,0" BorderBrush="Gray">
            <StatusBar.ItemsPanel>
                <ItemsPanelTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="1.5*"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                    </Grid>
                </ItemsPanelTemplate>
            </StatusBar.ItemsPanel>
            <StatusBarItem>
                <TextBlock Name="StatusKgName" Text="Katastralgemeinde: -"/>
            </StatusBarItem>
            <Separator Grid.Column="1"/>
            <StatusBarItem Grid.Column="2">
                <TextBlock Name="StatusWbRds" Text="Riede: -"/>
            </StatusBarItem>
            <Separator Grid.Column="3"/>
            <StatusBarItem Grid.Column="4">
                <TextBlock Name="StatusDefaultKgs" Text="Stammgemeinde: -"/>
            </StatusBarItem>
            <Separator Grid.Column="5"/>
            <StatusBarItem Grid.Column="6">
                <TextBlock Name="StatusAreaCommitments" Text="Flächenbindungen: -"/>
            </StatusBarItem>
            <Separator Grid.Column="7"/>
            <StatusBarItem Grid.Column="8">
                <TextBlock Name="StatusDeliveries" Text="Lieferungen: -"/>
            </StatusBarItem>
        </StatusBar>
    </Grid>
</local:ContextWindow>
