<Window x:Class="FlexGrid_UIATest.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" 
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        Title="C1FlexGrid Automation Test" Height="380" Width="800">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.Resources>
            <x:Array x:Key="data" Type="{x:Type sys:String}">
                <sys:String>Active</sys:String>
                <sys:String>Resolved</sys:String>
                <sys:String>Closed</sys:String>
            </x:Array>
        </Grid.Resources>
        <StackPanel Orientation="Horizontal">
            <ToolBarTray Height="26" Name="toolBarTray1"  >
                <ToolBar Height="26" Name="toolBar1"  >
                    <CheckBox Name="chk_AutoGenerateColumns" Content="AutoGenerateColumns" IsChecked="{Binding ElementName=flexgrid,Path=AutoGenerateColumns}"/>
                    <Button Content="Add Row" Name="btn_AddRow" />
                    <Button Content="Remove Row" Name="btn_RemoveRow" />
                    <Button Content="SelectedIndex" Name="btn_SelectedIndex" />
                    <Button Content="Copy" Name="btn_Copy" />
                </ToolBar>

            </ToolBarTray>
        </StackPanel>
        <c1:C1FlexGrid ItemsSource="{Binding}" x:Uid="flexgrid" 
                       AutomationProperties.AutomationId="flexgrid" 
                       x:Name="flexgrid" Grid.Row="1">
            <c1:C1FlexGrid.Columns>
                <c1:Column Binding="{Binding ID}" Header="ID"></c1:Column>
                <c1:Column Binding="{Binding Title,Mode=TwoWay}" Header="Title"></c1:Column>
                <c1:Column Binding="{Binding State,Mode=TwoWay}" Header="State">
                    <c1:Column.CellEditingTemplate>
                        <DataTemplate>
                            <ComboBox SelectedValue="{Binding State,Mode=TwoWay}" 
                                      ItemsSource="{Binding Source={StaticResource data}}" />

                        </DataTemplate>
                    </c1:Column.CellEditingTemplate>
                </c1:Column>
            </c1:C1FlexGrid.Columns>
        </c1:C1FlexGrid>
    </Grid>
</Window>
