<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="HitTestTemplate.MainPage" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480" FontFamily="Segoe UI" FontSize="14" 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">
    <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, Mode=TwoWay}" 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>
</UserControl>