<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="C1TreeViewEditSample.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml">
	<Grid x:Name="Root">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition />
		</Grid.RowDefinitions>
		<c1:C1TreeView x:Name="EditableTreeView" Grid.Row="1" BorderBrush="#FF8FB4CC">
            <c1:C1TreeView.ItemContainerStyle>
                <Style TargetType="c1:C1TreeViewItem">
                    <Setter Property="IsExpanded" Value="True" />
                </Style>
            </c1:C1TreeView.ItemContainerStyle>
            <c1:C1TreeView.ItemTemplate>
                <c1:C1HierarchicalDataTemplate x:Name="nodeTemplate" ItemsSource="{Binding Children}">
                    <StackPanel Orientation="Horizontal">
                        <Image HorizontalAlignment="Left" Width="16" Height="16" Source="{Binding Icon}" Stretch="Fill" Margin="0 0 5 0" />
                        <TextBlock Text="{Binding Name}" />
                    </StackPanel>
                </c1:C1HierarchicalDataTemplate>
            </c1:C1TreeView.ItemTemplate>
            <c1:C1TreeView.EditTemplate>
                <DataTemplate>
                    <TextBox Text="{Binding Name, Mode=TwoWay}" BorderThickness="0" Padding="0" Background="Transparent" />
                </DataTemplate>
            </c1:C1TreeView.EditTemplate>
        </c1:C1TreeView>
	</Grid>
</UserControl>