<UserControl x:Class="DataGridSamples.HierarchicalTasks"
      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:local="clr-namespace:DataGridSamples"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ResourceDictionary>
            <Style x:Key="TButtonStyle" TargetType="ToggleButton">
                <Setter Property="Cursor" Value="Hand"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ToggleButton">
                            <Grid Background="Transparent">
                                <Grid>
                                    <Grid x:Name="icos">
                                        <Rectangle x:Name="path"  Fill="{TemplateBinding Foreground}" VerticalAlignment="Center" HorizontalAlignment="Center" Height="1" Width="5" />
                                        <Rectangle x:Name="path1" Fill="{TemplateBinding Foreground}" Height="5" Width="1" Visibility="Collapsed"/>
                                    </Grid>
                                </Grid>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsChecked" Value="false">
                                    <Setter TargetName="path1" Property="Visibility" Value="Visible"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <c1:C1DataGrid x:Name="grid"
                               CanUserFilter="False"
                               CanUserSort="False"
                               CanUserAddRows="False"
                               RowBackground="White"
                               AlternatingRowBackground="White"
                               GridLinesVisibility="All"
                               LoadingRow="grid_LoadingRow"
                               LoadedRowHeaderPresenter="grid_LoadedRowHeaderPresenter"
                               LoadedRowPresenter="grid_LoadedRowPresenter"
                               LoadedCellPresenter="grid_LoadedCellPresenter"
                               AutoGeneratingColumn="grid_AutoGeneratingColumn"/>
    </Grid>
</UserControl>
