<Window x:Class="FlexGrid101.ColumnLayoutForm"
        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:c1="http://schemas.componentone.com/winfx/2006/xaml"          
        mc:Ignorable="d"
        Title="ColumnLayoutForm" Height="450" Width="800">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <c1:C1FlexGrid x:Name="grid" ItemsSource="{Binding}" AutoGenerateColumns="False" HeadersVisibility="None" GridLinesVisibility="Horizontal" SelectionMode="Row">
            <c1:C1FlexGrid.Columns>
                <c1:Column Width="*" IsReadOnly="True">
                    <c1:Column.CellTemplate>
                        <DataTemplate>
                            <CheckBox Content="{Binding Title}" IsChecked="{Binding IsVisible}" VerticalAlignment="Center"/>
                        </DataTemplate>
                    </c1:Column.CellTemplate>
                </c1:Column>
                <c1:Column IsReadOnly="True" Width="80">
                    <c1:Column.CellTemplate>
                        <DataTemplate>
                            <Button Content="&#x25BC;" Command="{Binding DownCommand}" VerticalAlignment="Center"/>
                        </DataTemplate>
                    </c1:Column.CellTemplate>
                </c1:Column>
                <c1:Column IsReadOnly="True" Width="80">
                    <c1:Column.CellTemplate>
                        <DataTemplate>
                            <Button Content="&#x25B2;" Command="{Binding UpCommand}" VerticalAlignment="Center"/>
                        </DataTemplate>
                    </c1:Column.CellTemplate>
                </c1:Column>
            </c1:C1FlexGrid.Columns>
            <!--<c1:FlexGrid.Behaviors>
                <c1:CheckListBehavior SelectionBinding="IsVisible"/>
            </c1:FlexGrid.Behaviors>-->
        </c1:C1FlexGrid>
        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Stretch">
            <Button x:Name="btnOK" Click="btnOK_Click" HorizontalAlignment="Stretch"/>
            <Button x:Name="btnCancel" Click="btnCancel_Click" HorizontalAlignment="Stretch"/>
        </StackPanel>
    </Grid>
</Window>
