Intersoft ClientUI Documentation
ItemEditTemplate Property
See Also  Send Feedback
Intersoft.Client.UI.Aqua.UXCollection Namespace > UXTreeView Class : ItemEditTemplate Property






Gets or sets a value that indicates the item edit template for UXTreeViewItem.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Common Properties")>
Public Property ItemEditTemplate As DataTemplate
Visual Basic (Usage)Copy Code
Dim instance As UXTreeView
Dim value As DataTemplate
 
instance.ItemEditTemplate = value
 
value = instance.ItemEditTemplate
C# 
[CategoryAttribute("Common Properties")]
public DataTemplate ItemEditTemplate {get; set;}
Delphi 
public read-write property ItemEditTemplate: DataTemplate; 
JScript 
CategoryAttribute("Common Properties")
public function get,set ItemEditTemplate : DataTemplate
Managed Extensions for C++ 
[CategoryAttribute("Common Properties")]
public: __property DataTemplate* get_ItemEditTemplate();
public: __property void set_ItemEditTemplate( 
   DataTemplate* value
);
C++/CLI 
[CategoryAttribute("Common Properties")]
public:
property DataTemplate^ ItemEditTemplate {
   DataTemplate^ get();
   void set (    DataTemplate^ value);
}

Example

The following code shows how to customize the editing controls in UXTreeView by setting a custom data template to the ItemEditTemplate.

XAML Copy Code
<Grid>
    <Intersoft:UXTreeView x:Name="EmployeeTrees" TreeSelectionMode="Multiple" ItemsSource="{Binding Employees}" 
                             DisplayMemberPath="Name" CollectionMemberPath="Employees" IsEditable="True">
        <Intersoft:UXTreeView.ItemEditTemplate>
            <DataTemplate>
                <StackPanel Orientation="Horizontal">
                    <Intersoft:UXTextBox Text="{Binding Name, Mode=TwoWay}" />
                    <TextBlock Text="|" />
                    <Intersoft:UXTextBox Text="{Binding Age, Mode=TwoWay}" />
                </StackPanel>
            </DataTemplate>
        </Intersoft:UXTreeView.ItemEditTemplate>
        <Intersoft:UXTreeView.ItemContainerStyle>
            <Style TargetType="Intersoft:UXTreeViewItem">
                <Setter Property="CollectionMemberPath" Value="Employees" />
                <Setter Property="DisplayMemberPath" Value="Name" />
            </Style>
        </Intersoft:UXTreeView.ItemContainerStyle>
    </Intersoft:UXTreeView>
</Grid>

Remarks

UXTreeView features built-in editing capability which can be easily enabled by setting the IsEditable property to true. When enabled, users can press the F2 key on the selected item to activate editing mode. By default, UXTextBox control will be used as the editing control.

If you prefer, you can also customize the editing control to use more advanced editing controls such as UXNumericUpDown by customizing the ItemEditTemplate property. To show the edited text/value properly, you must bind the property to the control you defined in the ItemEditTemplate property.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.