<UserControl x:Class="InABox.DynamicGrid.DynamicKanbanColumn"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="600" d:DesignWidth="300">
    <Grid x:Name="ColumnGrid">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="40" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Border Grid.Row="0" Grid.Column="0" BorderBrush="Gray" BorderThickness="0.75,0.75,0.75,0" Margin="0,0,2,0"
                Background="WhiteSmoke" ContextMenu="{Binding HeaderContextMenu}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Label x:Name="ColumnTitle" Grid.Row="0" Grid.Column="0" VerticalContentAlignment="Center"
                       HorizontalContentAlignment="Center" FontSize="18" Content="Column Title" />
                <Label x:Name="ItemCount" Grid.Column="1" HorizontalContentAlignment="Left"
                       VerticalContentAlignment="Center" FontSize="18" Content="(0 Items)" />
                <Label Grid.Row="0" Grid.Column="2" HorizontalContentAlignment="Center"
                       VerticalContentAlignment="Center" FontSize="24" Content=" &#x276e; " Foreground="Gray"
                       MouseLeftButtonUp="CollapseColumn_Click" />
            </Grid>
        </Border>

        <Border Grid.Row="0" Grid.Column="1" BorderBrush="Gray" BorderThickness="0.75" Background="WhiteSmoke">
            <Label FontSize="24" Content=" &#x276f; " Foreground="Gray" HorizontalContentAlignment="Center"
                   VerticalContentAlignment="Center" MouseLeftButtonUp="ExpandColumn_Click" />
        </Border>

        <ListBox x:Name="Items" Grid.Row="2" Grid.Column="0" VirtualizingPanel.IsVirtualizing="True"
                 VirtualizingPanel.VirtualizationMode="Recycling" HorizontalContentAlignment="Stretch"
                 ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemTemplate="{Binding ItemTemplate}"
                 ItemsSource="{Binding ItemsSource}" />


        <Border Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Margin="0,2,0,0" BorderBrush="Gray"
                BorderThickness="0.75" Background="WhiteSmoke">
            <DockPanel>
                <Label x:Name="HiddenCount" DockPanel.Dock="Top" FontSize="18" Content=" [HiddenCount]">
                    <Label.LayoutTransform>
                        <RotateTransform Angle="270" />
                    </Label.LayoutTransform>
                </Label>
                <Label x:Name="HiddenTitle" DockPanel.Dock="Top" FontSize="18" Content="Hidden Title"
                       HorizontalContentAlignment="Right">
                    <Label.LayoutTransform>
                        <RotateTransform Angle="270" />
                    </Label.LayoutTransform>
                </Label>
            </DockPanel>

        </Border>


    </Grid>
</UserControl>