<Window xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"  x:Class="HitTestTemplate.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="HitTest Template Application" Height="350" Width="525" WindowState="Maximized" FontFamily="Segoe UI" FontSize="14">
    <Grid  x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
        <c1:C1FlexGrid x:Name="_flex" MouseMove="_flex_MouseMove" >
            <c1:C1FlexGrid.Columns>
                <c1:Column ColumnName="_colTemplated" Binding="{Binding First}" Header="Template" Width="200">

                    <!-- template for cells in display mode -->
                    <c1:Column.CellTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding First}" Foreground="Green" FontWeight="Bold" />
                        </DataTemplate>
                    </c1:Column.CellTemplate>

                    <!-- template for cells in edit mode -->
                    <c1:Column.CellEditingTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Ellipse Width="8" Height="8" Fill="Red" Grid.Column="0" />
                                <TextBox Text="{Binding First, Mode=TwoWay}" Grid.Column="1" 
                                         Foreground="Green" Background="Transparent" 
                                         FontStyle="Italic" FontWeight="Bold" BorderThickness="0" />
                            </Grid>
                        </DataTemplate>
                    </c1:Column.CellEditingTemplate>
                </c1:Column>
            </c1:C1FlexGrid.Columns>
        </c1:C1FlexGrid>
        <TextBlock x:Name="_tb" Grid.Row="1" />
    </Grid>
</Window>
