Click or drag to resize
RadTreeViewItem Class
Represents an item in the RadTreeView control.
Represents an item in the RadTreeView control.
Inheritance Hierarchy
SystemObject
  System.Windows.ThreadingDispatcherObject
    System.WindowsDependencyObject
      System.Windows.MediaVisual
        System.WindowsUIElement
          System.WindowsFrameworkElement
            System.Windows.ControlsControl
              System.Windows.ControlsItemsControl
                System.Windows.ControlsHeaderedItemsControl
                  Telerik.Windows.Controls.TreeViewEditableHeaderedItemsControl
                    Telerik.Windows.ControlsRadTreeViewItem
                      Telerik.Windows.ControlsRadPanelBarItem

Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Navigation (in Telerik.Windows.Controls.Navigation.dll) Version: 2017.3.913.40 (2017.3.913.40)
Syntax
public class RadTreeViewItem : EditableHeaderedItemsControl, 
	IProvideStackingSize, ICachable, ICommandSource

The RadTreeViewItem type exposes the following members.

Constructors
  NameDescription
Public methodRadTreeViewItem
Initializes a new instance of the RadTreeViewItem class.
Top
Methods
  NameDescription
Public methodBeginEdit
Attempts to start editing the item.
(Overrides EditableHeaderedItemsControlBeginEdit.)
Public methodBringIndexIntoView
Brings the item with the given index into view. The method will not work before the item containers have been generated.
Public methodBringItemIntoView
Brings the given item into view. This is not a recursive method, it will only work for immediate items. The method will not work before the item containers have been generated.
Public methodCancelEdit
Cancels the edit.
(Overrides EditableHeaderedItemsControlCancelEdit.)
Protected methodChangeVisualState
Updates the visual state of the control.
(Overrides EditableHeaderedItemsControlChangeVisualState(Boolean).)
Protected methodClearContainerForItemOverride
When overridden in a derived class, undoes the effects of the PrepareContainerForItemOverride(DependencyObject, Object) method.
(Overrides ItemsControlClearContainerForItemOverride(DependencyObject, Object).)
Public methodCollapseAll
Collapses the item and its child items recursively.
Public methodCommitEdit
Tries to Commit edit.
(Overrides EditableHeaderedItemsControlCommitEdit.)
Public methodContains
Checks if the item has a particular item in its collection.
Public methodEnsureVisible
Ensures that a given item is displayed.
Public methodExpandAll
Expands the item and its child items recursively.
Protected methodGetContainerForItemOverride
Creates or identifies the element that is used to display the given item.
(Overrides ItemsControlGetContainerForItemOverride.)
Protected methodGetEditValue
Extracts a value that will be edited. This is normally the header of the control.
(Inherited from EditableHeaderedItemsControl.)
Public methodIsBefore
Gets a value indicating whether this item is rendered before the passed item.
Public methodIsDropPossible
Gets whether the the collection of dragged items can be dropped on the destination item.
Protected methodIsItemItsOwnContainerOverride
Determines if the specified item is (or is eligible to be) its own container.
(Overrides ItemsControlIsItemItsOwnContainerOverride(Object).)
Protected methodMeasureOverride
Public methodOnApplyTemplate
Called when the template of the control is being applied.
(Overrides EditableHeaderedItemsControlOnApplyTemplate.)
Protected methodOnChecked
Raises the [E:Checked] event.
Protected methodOnClick
Raises the [E:Click] event and tries to execute the [P:Command].
Protected methodOnCollapsed
Raises the [E:Collapsed] event.
Protected methodOnCreateAutomationPeer
Returns class-specific AutomationPeer.
(Overrides UIElementOnCreateAutomationPeer.)
Protected methodOnDoubleClick
Raises the [E:DoubleClick] event and tries to execute the [P:Command].
Protected methodOnEditCanceled
Raises the [E:EditCanceled] event.
(Inherited from EditableHeaderedItemsControl.)
Protected methodOnEdited
Raises the [E:Edited] event.
(Inherited from EditableHeaderedItemsControl.)
Protected methodOnEditorPrepare
Called when the item editor has been prepared.
(Inherited from EditableHeaderedItemsControl.)
Protected methodOnEditStarted
Raises the [E:Edited] event.
(Inherited from EditableHeaderedItemsControl.)
Protected methodOnExpanded
Raise the [E:Expanded] event.
Protected methodOnGotFocus
Called before the GotFocus event occurs.
(Overrides FrameworkElementOnGotFocus(RoutedEventArgs).)
Protected methodOnHeaderChanged
Called when the Header property of a HeaderedContentControl changes.
(Overrides HeaderedItemsControlOnHeaderChanged(Object, Object).)
Protected methodOnHeaderEditElementKeyDown
Called when KeyDown event occurs on the Header Edit Element.
Protected methodOnHeaderEditTemplateChanged
Called when the HeaderEditTemplate changes.
(Inherited from EditableHeaderedItemsControl.)
Protected methodOnHeaderEditTemplateSelectorChanged
Called when the HeaderEditTemplateSelector changes.
(Inherited from EditableHeaderedItemsControl.)
Protected methodOnInitialized
Raises the Initialized event. This method is invoked whenever IsInitialized is set to true internally.
(Overrides FrameworkElementOnInitialized(EventArgs).)
Protected methodOnIsEnabledChanged
The handler for the IsEnabledChanged event is fired.
Protected methodOnIsExpandedChanged
Called when the value of the IsExpanded property changes.
Protected methodOnIsInEditModeChanged
Called when the value of the IsInEditMode property changes.
(Overrides EditableHeaderedItemsControlOnIsInEditModeChanged(Boolean, Boolean).)
Protected methodOnItemsChanged
Invoked when the Items property changes.
(Overrides ItemsControlOnItemsChanged(NotifyCollectionChangedEventArgs).)
Protected methodOnKeyDown
Called before the KeyDown event occurs.
(Overrides ItemsControlOnKeyDown(KeyEventArgs).)
Protected methodOnLoadOnDemand
Raises the [E:LoadOnDemand] event.
Protected methodOnLostFocus
Called before the LostFocus event occurs.
(Overrides UIElementOnLostFocus(RoutedEventArgs).)
Protected methodOnPreviewChecked
Raises the [E:PreviewChecked] event.
Protected methodOnPreviewCollapsed
Raises the [E:PreviewCollapsed] event.
Protected methodOnPreviewEditCanceled
Raises the [E:PreviewEditCanceled] event.
(Inherited from EditableHeaderedItemsControl.)
Protected methodOnPreviewEdited
Raises the [E:PreviewEdited] event.
(Inherited from EditableHeaderedItemsControl.)
Protected methodOnPreviewEditorPrepare
Prepares the editor for the TreeViewItem. This override binds the default TextBox to the property that is edited if necessary.
(Overrides EditableHeaderedItemsControlOnPreviewEditorPrepare(EditorPrepareEventArgs).)
Protected methodOnPreviewEditStarted
Raises the [E:Edited] event.
(Inherited from EditableHeaderedItemsControl.)
Protected methodOnPreviewExpanded
Raises the [E:PreviewExpanded] event.
Protected methodOnPreviewSelected
Raises the [E:PreviewSelected] event.
Protected methodOnPreviewUnchecked
Raises the [E:PreviewUnchecked] event.
Protected methodOnPreviewUnselected
Raises the [E:PreviewUnselected] event.
Protected methodOnSelected
Raises the [E:Selected] event.
Protected methodOnUnchecked
Raises the [E:Unchecked] event.
Protected methodOnUnselected
Raises the [E:Unselected] event.
Protected methodPrepareContainerForItemOverride
Prepares the specified element to display the specified item.
(Overrides ItemsControlPrepareContainerForItemOverride(DependencyObject, Object).)
Protected methodPrepareEditor
Called when the editor for the edit operation is begin prepared.
(Inherited from EditableHeaderedItemsControl.)
Protected methodSetEditValue
Sets the new value after a successful edit. By default it sets the header.
(Inherited from EditableHeaderedItemsControl.)
Public methodToString
Return item text value.
(Overrides HeaderedItemsControlToString.)
Top
Extension Methods
  NameDescription
Public Extension MethodChildrenOfTypeT
Gets all child elements recursively from the visual tree by given type.
(Defined by ChildrenOfTypeExtensions.)
Public Extension MethodClearIfNoBindingAndSet
Clears if set.
(Defined by CommonExtensions.)
Public Extension MethodClearIfSet
Clears the property if a value has been set.
(Defined by CommonExtensions.)
Public Extension MethodDeserializePrimitives
Deserializes some primitive properties of a control.
(Defined by SerializationExtensions.)
Public Extension MethodEnableLayoutRounding (Defined by LayoutRoundingHelperExtensions.)
Public Extension MethodFindChildByTypeT
Finds child element of the specified type. Uses breadth-first search.
(Defined by ChildrenOfTypeExtensions.)
Public Extension MethodGetAssociatedInlineUIContainer (Defined by ExtensionMethods.)
Public Extension MethodGetAssociatedLayoutBox (Defined by ExtensionMethods.)
Public Extension MethodGetBaseControlItemStatus
Gets a string that communicates the visual status of a Control.
(Defined by AutomationExtensions.)
Public Extension MethodGetBoundsRelativeTo
Gets the bounds relative to the current framework element.
(Defined by ExtensionMethods.)
Public Extension MethodGetGlobalMousePosition
(Defined by WindowHost.)
Public Extension MethodGetParents
Enumerates through element's parents in the visual tree.
(Defined by ParentOfTypeExtensions.)
Public Extension MethodGetVisualParentT
Searches up in the visual tree for parent element of the specified type.
(Defined by ParentOfTypeExtensions.)
Public Extension MethodIsAncestorOf(DependencyObject)Overloaded.
Determines whether the element is ancestor of the current UI element.
(Defined by ExtensionMethods.)
Public Extension MethodIsAncestorOf(DependencyObject)Overloaded.
Determines whether the element is an ancestor of the descendant.
(Defined by ParentOfTypeExtensions.)
Public Extension MethodIsKeyboardFocusWithin
Determines whether keyboard focus is within the current UI element.
(Defined by KeyboardHelper.)
Public Extension MethodIsLocalValueSet(DependencyProperty)Overloaded.
Determines whether the specified dependency property local value is set.
(Defined by DependencyObjectExtensions.)
Public Extension MethodIsLocalValueSet(DependencyProperty)Overloaded.
Determines whether the specified dependency property local value is set.
(Defined by CommonExtensions.)
Public Extension MethodParentOfTypeT
Gets the parent element from the visual tree by given type.
(Defined by ParentOfTypeExtensions.)
Public Extension MethodSerializePrimitives
Serializes some primitive properties of a control.
(Defined by SerializationExtensions.)
Public Extension MethodSetAssociatedLayoutBox (Defined by ExtensionMethods.)
Public Extension MethodSetIfDifferent
Sets the value of the dependencyProperty property if it's hasn't that value currently.
(Defined by CommonExtensions.)
Public Extension MethodSetLayout
Sets the location in the element in Canvas.
(Defined by CommonExtensions.)
Public Extension MethodSetLocation(Point)Overloaded.
Sets the location in the element in Canvas.
(Defined by CommonExtensions.)
Public Extension MethodSetLocation(Double, Double)Overloaded.
Sets the location in the element in Canvas.
(Defined by CommonExtensions.)
Public Extension MethodSlideInOverloaded.
Slides the given element into view. This is an extension method.
(Defined by CalendarAnimation.)
Public Extension MethodSlideIn(TimeSpan)Overloaded.
Slides the given element into view. This is an extension method.
(Defined by CalendarAnimation.)
Public Extension MethodSlideOutOverloaded.
Slides the given element out of view. This is an extension method.
(Defined by CalendarAnimation.)
Public Extension MethodSlideOut(TimeSpan)Overloaded.
Slides the given element out of view. This is an extension method.
(Defined by CalendarAnimation.)
Public Extension MethodTranslate(NullableDouble, NullableDouble, NullableDouble, NullableDouble, TimeSpan)Overloaded.
Translates the target element as requested by the parameters.
(Defined by CalendarAnimation.)
Public Extension MethodTranslate(NullableDouble, NullableDouble, NullableDouble, NullableDouble, TimeSpan, Action)Overloaded.
Translates the target element as requested by the parameters and executes the action request.
(Defined by CalendarAnimation.)
Top
Fields
  NameDescription
Public fieldStatic memberCheckedEvent
Identifies the Checked routed event.
Public fieldStatic memberCheckStateProperty
Identifies the CheckState dependency property.
Public fieldStatic memberClickEvent
Identifies the Click routed event.
Public fieldStatic memberCollapsedEvent
Identifies the Collapsed routed event.
Public fieldStatic memberCommandExecutionTriggerProperty
Identifies the CommandExecutionTrigger dependency property.
Public fieldStatic memberCommandParameterProperty
Identifies the CommandParameter dependency property.
Public fieldStatic memberCommandProperty
Identifies the ClickCommand dependency property.
Public fieldStatic memberCommandTargetProperty
Identifies the CommandTarget dependency property.
Public fieldStatic memberDefaultImageSrcProperty
Identifies the DefaultImageSrc dependency property.
Public fieldStatic memberDoubleClickEvent
Identifies the DoubleClick routed event.
Public fieldStatic memberDropPositionProperty
Identifies the DropPosition property.
Public fieldStatic memberExpandedEvent
Identifies the Expanded routed event.
Public fieldStatic memberExpandedImageSrcProperty
Identifies the ExpandedImageSrc dependency property.
Public fieldStatic memberExpanderStyleProperty
Identifies the ExpanderStyle dependency property.
Public fieldStatic memberIsCheckBoxEnabledProperty
Identifies the IsCheckBoxEnabled dependency property.
Public fieldStatic memberIsCheckedProperty
Identifies the IsChecked property.
Public fieldStatic memberIsDragOverProperty
Identifies the IsDragOver property.
Public fieldStatic memberIsDropAllowedProperty
Identifies the IsDropAllowed dependency property.
Public fieldStatic memberIsExpandedProperty
Identifies the IsExpanded dependency property.
Public fieldStatic memberIsLoadingOnDemandProperty
Identifies the IsLoadingOnDemand dependency property.
Public fieldStatic memberIsLoadOnDemandEnabledProperty
Identifies the IsLoadOnDemandEnabled dependency property.
Public fieldStatic memberIsMouseOverHeaderProperty
Identifies the IsMouseOverHeader dependency property.
Public fieldStatic memberIsSelectedProperty
Identifies the IsSelected dependency property.
Public fieldStatic memberIsSelectionActiveProperty
Identifies the IsSelectionActive dependency property.
Public fieldStatic memberIsSelectionActivePropertyKey
Identifies the IsSelectionActivePropertyKey dependency property.
Public fieldStatic memberItemVisibilityProperty
Identifies the ItemVisibility dependency property.
Public fieldStatic memberLoadOnDemandEvent
Identifies the LoadOnDemand routed event.
Public fieldStatic memberOptionTypeProperty
Identifies the OptionTypeProperty dependency property.
Public fieldStatic memberPreviewCheckedEvent
Identifies the PreviewChecked routed event.
Public fieldStatic memberPreviewCollapsedEvent
Identifies the PreviewCollapsed routed event.
Public fieldStatic memberPreviewExpandedEvent
Identifies the PreviewExpanded routed event.
Public fieldStatic memberPreviewSelectedEvent
Identifies the PreviewSelected routed event.
Public fieldStatic memberPreviewUncheckedEvent
Identifies the PreviewUnchecked routed event.
Public fieldStatic memberPreviewUnselectedEvent
Identifies the PreviewUnselected routed event.
Public fieldStatic memberSelectedEvent
Identifies the Selected routed event.
Public fieldStatic memberSelectedImageSrcProperty
Identifies the SelectedImageSrc dependency property.
Public fieldStatic memberUncheckedEvent
Identifies the Unchecked routed event.
Public fieldStatic memberUnselectedEvent
Identifies the Unselected routed event.
Top
Properties
  NameDescription
Public propertyCheckState
Gets or sets the toggle state of the item - On, Off or Indeterminate.
Public propertyCommand
Gets or sets the command for Click event of the RadTreeViewItem.
Public propertyCommandExecutionTrigger
Gets or sets a value indicating when the Command must be executed.
Public propertyCommandParameter
Gets or sets the command parameter of the RadTreeViewItem.
Public propertyCommandTarget
Gets or sets the command target of the RadTreeViewItem when using routed command.
Public propertyDefaultImageSrc
Gets or sets the image that the TreeViewItem will display by default.
Public propertyDropPosition
Gets or sets the DropPosition for the current drop (Before, Inside, After). Setting this property only makes sense in a DragDrop handler.
Public propertyExpandedImageSrc
Gets or sets the image that the TreeViewItem will display when it is expanded.
Public propertyExpanderStyle
Gets or sets the style for the item's expand arrow.
Public propertyFullPath
Gets the path from the root tree item to the current tree item delimited with the PathSeparator specified by RadTreeView.
Protected propertyHeaderEditPresenterElement
Gets the content presenter used for editing.
(Inherited from EditableHeaderedItemsControl.)
Public propertyHeaderEditTemplate
Gets or sets the header edit template.
(Inherited from EditableHeaderedItemsControl.)
Public propertyHeaderEditTemplateSelector
Gets or sets the header edit template selector.
(Inherited from EditableHeaderedItemsControl.)
Public propertyIndex
Gets the position of the tree item in the tree item collection.
Public propertyIsCheckBoxEnabled
Gets whether the tree item will display a check box.
Public propertyIsChecked
Gets or sets a value indicating whether the TreeView item is checked. Null means 'indeterminate'.
Public propertyIsDragOver
Gets or sets a value indicating whether an item is being dragged over the TreeViewItem.
Public propertyIsDropAllowed
Gets or sets a value indicating whether the tree item can accept data that the user drags onto it.
Public propertyIsEditable
Gets or sets a value indicating whether the control is editable.
(Inherited from EditableHeaderedItemsControl.)
Public propertyIsExpanded
Gets or sets a value indicating whether the TreeViewItem is in the expanded state.
Public propertyIsInEditMode
Gets or sets a value indicating whether this instance is in edit mode.
(Inherited from EditableHeaderedItemsControl.)
Public propertyIsInSelectedPath
Gets a value indicating whether this item is in the selection path.
Public propertyIsInViewport
Gets a value indicating whether the tree item is in ScrollViewer viewport.
Public propertyIsLoadingOnDemand
Gets or sets whether the tree item is in loading on demand state.
Public propertyIsLoadOnDemandEnabled
Gets or sets a value indicating whether loading on demand is enabled.
Public propertyIsMouseOverHeader
Gets a value indicating whether the mouse cursor is over the item header.
Public propertyIsRootItem
Gets a value if the item is root item.
Public propertyIsSelected
Gets or sets a value indicating whether the tree item is in selected state.
Public propertyIsSelectionActive
Gets whether the tree item selection is active - e.g. the item is selected and the TreeView is focused.
Public propertyItem
Gets the data item associated to the RadTreeViewItem.
Public propertyItemVisibility
Gets or sets a value indicating when the item should be visible or not.
Public propertyLevel
Gets the zero-based depth of the tree item in the RadTreeView tree.
Public propertyNextItem
Gets the next available item. Used for traversal of the tree view.
Public propertyNextSiblingItem
Gets the next sibling tree item.
Public propertyOptionType
Gets or sets the type of the option element that the item displays.
Public propertyParentItem
Gets the parent tree view item of the current tree view item.
Public propertyParentTreeView
Gets the parent tree view associated with the current tree view item.
Public propertyPreviousItem
Gets the previous available item. Used for traversal of the tree view.
Public propertyPreviousSiblingItem
Gets the previous sibling tree item.
Public propertyRootItem
Gets the root parent item for this instance.
Public propertySelectedImageSrc
Gets or sets the image that the TreeViewItem displays when it is selected.
Top
Events
  NameDescription
Public eventChecked
Occurs when the item is checked.
Public eventClick
Occurs after the tree item is clicked.
Public eventCollapsed
Occurs after the tree item is collapsed.
Public eventDoubleClick
Occurs after the tree item is double clicked.
Public eventEditCanceled
Occurs after an edit has been cancelled.
(Inherited from EditableHeaderedItemsControl.)
Public eventEdited
Occurs when a item has been edited.
(Inherited from EditableHeaderedItemsControl.)
Public eventEditorPrepare
The event is raised when an editor needs to be prepared.
(Inherited from EditableHeaderedItemsControl.)
Public eventEditStarted
Occurs after edit of the control has started.
(Inherited from EditableHeaderedItemsControl.)
Public eventExpanded
Occurs after the tree item is expanded.
Public eventLoadOnDemand
Occurs when the tree item should load its child items on demand.
Public eventPreviewChecked
Occurs before the tree item is checked.
Public eventPreviewCollapsed
Occurs before an item is collapsed.
Public eventPreviewEditCanceled
Occurs just before an edit has been cancelled.
(Inherited from EditableHeaderedItemsControl.)
Public eventPreviewEdited
Occurs before the edit is committed.
(Inherited from EditableHeaderedItemsControl.)
Public eventPreviewEditorPrepare
Raised before an editor for an edit operation needs to be prepared.
(Inherited from EditableHeaderedItemsControl.)
Public eventPreviewEditStarted
Occurs before the edit has begun.
(Inherited from EditableHeaderedItemsControl.)
Public eventPreviewExpanded
Occurs before an item is expanded.
Public eventPreviewSelected
Occurs before the tree item is selected.
Public eventPreviewUnchecked
Occurs before the tree item is unchecked.
Public eventPreviewUnselected
Occurs before an item is unselected.
Public eventSelected
Occurs after the tree item is selected.
Remarks
For more information about handling events, see also PreviewSelected.
Public eventUnchecked
Occurs when the item is unchecked.
Public eventUnselected
Occurs after the tree item is unselected.
Top
Remarks

The RadTreeView control is made up of items. Items which are immediate children of the TreeView are root items. Items which are children of root items are child items.

An item usually stores data in two properties, the Header property and the Tag property. The value of the Header property is displayed in the RadTreeView control, and the Tag property is used to store additional data.

To create tree items, use one of the following methods:

  • Use declarative syntax to define items inline in your page.
  • Data bind the RadTreeView control to a data source.
See Also