ClassRadTreeView
A hierarchical control used to display a tree of items.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.Navigation.dll
Syntax:
[TelerikToolboxCategory("Navigation")]
[Themable]
public class RadTreeView : ItemsControl, IScrollingServiceCore, IScrollingInfo
Inheritance: objectRadTreeView
Derived Classes:
Implements:
Constructors
RadTreeView()
Initializes a new instance of the RadTreeView class.
Declaration
public RadTreeView()
Remarks
Use this constructor to create and initialize a new instance of the RadTreeView control.
Fields
AutoScrollToSelectedItemProperty
Identifies the AutoScrollToSelectedItem property.
Declaration
public static readonly DependencyProperty AutoScrollToSelectedItemProperty
Field Value
DependencyProperty
BringIntoViewModeProperty
Identifies the BringIntoView property.
Declaration
public static readonly DependencyProperty BringIntoViewModeProperty
Field Value
DependencyProperty
CheckedItemsProperty
Identifies the CheckedItemsProperty dependency property.
Declaration
public static readonly DependencyProperty CheckedItemsProperty
Field Value
DependencyProperty
DragEndedEvent
Identifies the DragEnded routed event.
Declaration
[Obsolete("This property will be removed. Use DragDropManager API to customize drag drop operations.", false)]
public static readonly RoutedEvent DragEndedEvent
Field Value
RoutedEvent
DragOverTreeEvent
Identifies the DragOverTree routed event.
Declaration
[Obsolete("This property will be removed. Use DragDropManager API to customize drag drop operations.", false)]
public static readonly RoutedEvent DragOverTreeEvent
Field Value
RoutedEvent
DragStartedEvent
Identifies the DragStarted routed event.
Declaration
[Obsolete("This property will be removed. Use DragDropManager API to customize drag drop operations.", false)]
public static readonly RoutedEvent DragStartedEvent
Field Value
RoutedEvent
DropExpandDelayProperty
Identifies the DropExpandDelay property.
Declaration
public static readonly DependencyProperty DropExpandDelayProperty
Field Value
DependencyProperty
ExpanderStyleProperty
Identifies the ExpanderStyle dependency property.
Declaration
public static readonly DependencyProperty ExpanderStyleProperty
Field Value
DependencyProperty
ImagesBaseDirProperty
Identifies the ImagesBaseDirectory dependency property.
Declaration
public static readonly DependencyProperty ImagesBaseDirProperty
Field Value
DependencyProperty
IsDragDropEnabledProperty
Identifies the IsDragDropEnabled dependency property.
Declaration
public static readonly DependencyProperty IsDragDropEnabledProperty
Field Value
DependencyProperty
IsDragPreviewEnabledProperty
Identifies the IsDragPreviewEnabled dependency property.
Declaration
public static readonly DependencyProperty IsDragPreviewEnabledProperty
Field Value
DependencyProperty
IsDragTooltipEnabledProperty
Identifies the IsDragTooltipEnabled dependency property.
Declaration
public static readonly DependencyProperty IsDragTooltipEnabledProperty
Field Value
DependencyProperty
IsDropPreviewLineEnabledProperty
Identifies the IsDropPreviewLineEnabled dependency property.
Declaration
public static readonly DependencyProperty IsDropPreviewLineEnabledProperty
Field Value
DependencyProperty
IsEditableProperty
Identifies the IsEditable dependency property.
Declaration
public static readonly DependencyProperty IsEditableProperty
Field Value
DependencyProperty
IsExpandOnDblClickEnabledProperty
Identifies the IsExpandOnDoubleClickEnabled dependency property.
Declaration
public static readonly DependencyProperty IsExpandOnDblClickEnabledProperty
Field Value
DependencyProperty
IsExpandOnSingleClickEnabledProperty
Identifies the IsExpandOnSingleClickEnabled dependency property.
Declaration
public static readonly DependencyProperty IsExpandOnSingleClickEnabledProperty
Field Value
DependencyProperty
IsLineEnabledProperty
Identifies the IsLineEnabled dependency property.
Declaration
public static readonly DependencyProperty IsLineEnabledProperty
Field Value
DependencyProperty
IsLoadOnDemandEnabledProperty
Identifies the IsLoadOnDemandEnabled dependency property.
Declaration
public static readonly DependencyProperty IsLoadOnDemandEnabledProperty
Field Value
DependencyProperty
IsOptionElementsEnabledProperty
Identifies the IsOptionElementsEnabled dependency property.
Declaration
public static readonly DependencyProperty IsOptionElementsEnabledProperty
Field Value
DependencyProperty
IsRootLinesEnabledProperty
Identifies the IsRootLinesEnabled dependency property.
Declaration
public static readonly DependencyProperty IsRootLinesEnabledProperty
Field Value
DependencyProperty
IsSingleExpandPathProperty
Identifies the IsSingleExpandPath dependency property.
Declaration
public static readonly DependencyProperty IsSingleExpandPathProperty
Field Value
DependencyProperty
IsTriStateModeProperty
Identifies the IsTriStateMode dependency property.
Declaration
public static readonly DependencyProperty IsTriStateModeProperty
Field Value
DependencyProperty
ItemEditTemplateProperty
Identifies the ItemEditTemplate dependency property.
Declaration
public static readonly DependencyProperty ItemEditTemplateProperty
Field Value
DependencyProperty
ItemEditTemplateSelectorProperty
Identifies the ItemEditTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty ItemEditTemplateSelectorProperty
Field Value
DependencyProperty
ItemsIndentProperty
Identifies the ItemsIndent dependency property.
Declaration
public static readonly DependencyProperty ItemsIndentProperty
Field Value
DependencyProperty
PathSeparatorProperty
Identifies the PathSeparator dependency property.
Declaration
public static readonly DependencyProperty PathSeparatorProperty
Field Value
DependencyProperty
PerformSelectionOnMouseUpProperty
Identifies the PerformSelectionOnMouseUp property.
Declaration
public static readonly DependencyProperty PerformSelectionOnMouseUpProperty
Field Value
DependencyProperty
PreviewDragEndedEvent
Identifies the PreviewDragEnded routed event.
Declaration
[Obsolete("This property will be removed. Use DragDropManager API to customize drag drop operations.", false)]
public static readonly RoutedEvent PreviewDragEndedEvent
Field Value
RoutedEvent
PreviewDragStartedEvent
Identifies the PreviewDragStarted routed event.
Declaration
[Obsolete("This property will be removed. Use DragDropManager API to customize drag drop operations.", false)]
public static readonly RoutedEvent PreviewDragStartedEvent
Field Value
RoutedEvent
PreviewSelectionChangedEvent
Identifies the PreviewSelectionChanged routed event.
Declaration
public static readonly RoutedEvent PreviewSelectionChangedEvent
Field Value
RoutedEvent
SelectedContainerProperty
Identifies the SelectedContainer property.
Declaration
public static readonly DependencyProperty SelectedContainerProperty
Field Value
DependencyProperty
SelectedItemProperty
Identifies the SelectedItem property.
Declaration
public static readonly DependencyProperty SelectedItemProperty
Field Value
DependencyProperty
SelectedItemsProperty
Identifies the SelectedItemsProperty dependency property.
Declaration
public static readonly DependencyProperty SelectedItemsProperty
Field Value
DependencyProperty
SelectedValuePathProperty
Identifies the SelectedValuePath dependency property.
Declaration
public static readonly DependencyProperty SelectedValuePathProperty
Field Value
DependencyProperty
SelectedValueProperty
Identifies the SelectedValue dependency property.
Declaration
public static readonly DependencyProperty SelectedValueProperty
Field Value
DependencyProperty
SelectionChangedEvent
Identifies the SelectionChanged routed event.
Declaration
public static readonly RoutedEvent SelectionChangedEvent
Field Value
RoutedEvent
SelectionModeProperty
Identifies the SelectionMode dependency property.
Declaration
public static readonly DependencyProperty SelectionModeProperty
Field Value
DependencyProperty
TextDropAfterProperty
Identifies the TextDropAfter dependency property.
Declaration
public static readonly DependencyProperty TextDropAfterProperty
Field Value
DependencyProperty
TextDropBeforeProperty
Identifies the TextDropBefore dependency property.
Declaration
public static readonly DependencyProperty TextDropBeforeProperty
Field Value
DependencyProperty
TextDropInProperty
Identifies the TextDropIn dependency property.
Declaration
public static readonly DependencyProperty TextDropInProperty
Field Value
DependencyProperty
TextDropRootProperty
Identifies the TextDropRoot dependency property.
Declaration
public static readonly DependencyProperty TextDropRootProperty
Field Value
DependencyProperty
TextSearchModeProperty
Identifies the TextSearchMode dependency property.
Declaration
public static readonly DependencyProperty TextSearchModeProperty
Field Value
DependencyProperty
Properties
AutoScrollToSelectedItem
Gets or sets a value indicating whether the selected RadTreeViewItem should be scrolled into the viewport. When using virtualization this property works only for realized RadTreeViewItem(s).
Declaration
public bool AutoScrollToSelectedItem { get; set; }
Property Value
BringIntoViewMode
Gets or sets whether just the item's header should be brought into view when the respective methods are called of the header and its items.
Declaration
public BringIntoViewMode BringIntoViewMode { get; set; }
Property Value
CheckedItems
Gets a collection containing the items that are currently checked.
Declaration
public ICollection<object> CheckedItems { get; }
Property Value
DropExpandDelay
Gets or sets the time has to pass before an item will be expanded because of something being dragged over it. This is a dependency property.
ExpanderStyle
Gets or sets the style of RadTreeViewItem expander button.
Declaration
[Browsable(false)]
public Style ExpanderStyle { get; set; }
Property Value
Style
Remarks
The expander button is a ToggleButton. To modify the appearance of the expander first create a Style for a ToggleButton and then set the defined style to this property.
ImagesBaseDir
Gets or sets the directory where image files used for the TreeView images.
IsDragDropEnabled
Gets or sets a value indicating whether drag and drop is enabled.
IsDragPreviewEnabled
Gets or sets a value indicating whether drag feedback is shown while dragging.
IsDragTooltipEnabled
Gets or sets a value indicating whether drag tooltip is shown while dragging.
IsDropPreviewLineEnabled
Gets or sets a value indicating whether drag outline is shown while dragging.
Declaration
public bool IsDropPreviewLineEnabled { get; set; }
Property Value
IsEditable
Gets or sets a value indicating whether the user can edit the TreeViewItems.
IsEditing
Gets if there is an open editor in the tree view.
Declaration
[Browsable(false)]
public virtual bool IsEditing { get; }
Property Value
IsExpandOnDblClickEnabled
Gets or sets a value whether the item will toggle its expand state on double click.
Declaration
public bool IsExpandOnDblClickEnabled { get; set; }
Property Value
IsExpandOnSingleClickEnabled
Gets or sets a value indicating whether the item will toggle its expand state on single click.
Declaration
public bool IsExpandOnSingleClickEnabled { get; set; }
Property Value
IsLineEnabled
Gets or sets a value indicating whether connecting lines are displayed.
IsLoadOnDemandEnabled
Gets or sets a value indicating whether loading on demand is enabled.
Declaration
public bool IsLoadOnDemandEnabled { get; set; }
Property Value
Remarks
When the value is set to true the expander visual will be visible even if the item do no have children. When the expander visual is clicked, the event is raised and you can populate the node.
IsOptionElementsEnabled
Gets or sets a value indicating whether checkboxes/radio buttons are displayed besides the TreeViewItems.
IsRootLinesEnabled
Gets or sets a value indicating whether lines are displayed next to root item.
IsSingleExpandPath
Gets a value indicating whether only one branch of the TreeView will be expanded.
Declaration
public bool IsSingleExpandPath { get; set; }
Property Value
Remarks
The property closes all item that are not parents of the last expanded item.
IsTriStateMode
Gets or sets a value indicating whether tri state mode for the checkboxes in the option lists is enabled.
Declaration
public bool IsTriStateMode { get; set; }
Property Value
Remarks
When the value is set to true the checked state of the item depends on the checked state of its child items. When the checked state of the item is changed - the child items state is also changed.
IsVirtualizing
Gets or sets a value indicating whether the TreeView should virtualize its items. Virtualization should be used only when the TreeView is data bound.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Virtualizing", Justification = "This is the correct spelling")]
public bool IsVirtualizing { get; set; }
Property Value
Remarks
This is a CLR wrapper for the TreeViewPanel.IsVirtualizing property. It will only work if the ItemsPanel of the TreeViewItem is a TreeViewPanel.
ItemEditTemplate
Gets or sets the template that the items will display when edited.
Declaration
public DataTemplate ItemEditTemplate { get; set; }
Property Value
DataTemplate
The item edit template.
ItemEditTemplateSelector
Gets or sets the template selector that the items will use to select a template to display when edited.
Declaration
public DataTemplateSelector ItemEditTemplateSelector { get; set; }
Property Value
DataTemplateSelector
The item edit template selector.
ItemsIndent
Gets or sets the distance that each tree item level will be indented.
PathSeparator
Gets or sets the delimiter string that the tree item path uses.
Declaration
public string PathSeparator { get; set; }
Property Value
Remarks
The tree item path contains of a set of tree item labels
separated by the PathSeparator delimiter strings.
The default return value is the backslash character ().
PerformSelectionOnMouseUp
Gets or sets a boolean value indicating whether the selection will be performed on mouse up.
Declaration
public bool PerformSelectionOnMouseUp { get; set; }
Property Value
ScrollViewer
Gets the ScrollViewer control the is inside the RadTreeView.
Declaration
public ScrollViewer ScrollViewer { get; }
Property Value
ScrollViewer
Remarks
Use the ScrollViewer.HorizontalScrollBarVisibility and ScrollViewer.VerticalScrollBarVisibility attached properties to set the visibility of the ScrollBars.
SelectedContainer
Gets the TreeViewItem container that is currently selected. This is a dependency property.
Declaration
public RadTreeViewItem SelectedContainer { get; }
Property Value
SelectedItem
Gets or sets the item that is currently selected. This is a dependency property.
SelectedItems
Gets a collection containing the items that are currently selected.
Declaration
[Browsable(false)]
public ObservableCollection<object> SelectedItems { get; }
Property Value
SelectedValue
Gets or sets the value of the SelectedItem, obtained by using SelectedValuePath.
SelectedValuePath
Gets or sets the path that is used to extract the SelectedValue from the SelectedItem.
SelectionMode
Gets or sets the selection mode.
Declaration
public SelectionMode SelectionMode { get; set; }
Property Value
SelectionMode
TextDropAfter
Gets or sets the text "Drop after" text of the drag preview.
Declaration
public string TextDropAfter { get; set; }
Property Value
The text drop after.
TextDropBefore
Gets or sets the text "Drop before" text of the drag preview.
Declaration
public string TextDropBefore { get; set; }
Property Value
The text drop before.
TextDropIn
Gets or sets the text for "Drop in" text of the drag preview.
Declaration
public string TextDropIn { get; set; }
Property Value
The text drop in.
TextDropRoot
Gets or sets the text that appears when an item is dropped in an empty TreeView.
Declaration
public string TextDropRoot { get; set; }
Property Value
The text drop in.
TextSearchMode
Gets or sets the text search mode. Specifies how TextSearch will match items. This is a dependency property.
Declaration
public TextSearchMode TextSearchMode { get; set; }
Property Value
The text search mode.
Methods
AddItemByPath(string)
Creates a new item and adds a item by path. Can be used if the TreeView is not data bound.
Declaration
public RadTreeViewItem AddItemByPath(string path)
Parameters
path
Where the item should be added.
Returns
The new item if the operation is successful.
AddItemByPath(string, string)
Creates a new item and adds a item by path. The label of the new item will be the text after the last separator.
Declaration
public RadTreeViewItem AddItemByPath(string path, string separator)
Parameters
path
Where the item should be added.
separator
The path separator.
Returns
The new item if the operation is successful.
AddItemsByPath(string, string)
Adds an item at the given path, given that the TreeView is not bound.
Declaration
public RadTreeViewItem AddItemsByPath(string path, string separator)
Parameters
path
The path to create an item at.
separator
The path separator.
Returns
The newly created RadTreeViewItem.
BringIndexIntoView(int)
Brings the item with the given index into view. The method will not work before the item containers have been generated.
Declaration
public void BringIndexIntoView(int index)
Parameters
index
The index of the item to be brought into view.
BringIndexIntoView(int, Point)
Brings the item with the given index into view. The method will not work before the item containers have been generated.
Declaration
public void BringIndexIntoView(int index, Point offset)
Parameters
index
The index of the item to be brought into view.
offset
Point
The offset to tree view top left corner where the item should be scrolled to.
BringItemIntoView(object)
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.
Declaration
public void BringItemIntoView(object item)
Parameters
item
The item to be brought into view.
BringItemIntoView(object, Point)
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.
Declaration
public void BringItemIntoView(object item, Point offset)
Parameters
item
The item to be brought into view.
offset
Point
The offset to tree view top left corner where the item should be scrolled to.
BringPathIntoView(string)
Brings an item into view. Works recursively for nested containers. If the Loaded event has not been fired yet the method will be scheduled for execution after the Loaded event. The method will realize the required containers if they are not yet created.
Declaration
public void BringPathIntoView(string path)
Parameters
path
The path of the item to be brought into view.
BringPathIntoView(string, Point)
Brings an item into view. Works recursively for nested containers. If the Loaded event has not been fired yet the method will be scheduled for execution after the Loaded event. The method will realize the required containers if they are not yet created.
Declaration
public void BringPathIntoView(string path, Point offset)
Parameters
path
The path of the item to be brought into view.
offset
Point
The offset from the top left corner of the tree where the item will be scrolled to.
ChangeVisualState(bool)
Updates the visual state of the control.
Declaration
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
[SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters")]
protected void ChangeVisualState(bool useTransitions)
Parameters
useTransitions
ClearContainerForItemOverride(DependencyObject, object)
Declaration
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters
element
DependencyObject
item
CollapseAll()
Collapses all items recursively.
Declaration
public void CollapseAll()
ContainerFromItemRecursive(object)
Recursively searches the tree view in the tree to get an item container (RadTreeViewItem) for the particular data item.
Declaration
public RadTreeViewItem ContainerFromItemRecursive(object item)
Parameters
item
Returns
CreateDragVisualContent(IList<object>)
Creates default drag visual content - snapshot of all dragged items. Override this method in subclass in order to change the default drag visual content.
ExpandAll()
Expands all items recursively.
Declaration
public void ExpandAll()
Remarks
If a child item is not generated it will be expanded once it is generated.
ExpandItemByPath(string)
Expands to an item with a given path.
Declaration
public void ExpandItemByPath(string path)
Parameters
path
The path to an item.
ExpandItemByPath(string, string)
Expands to an item with a given path.
GetContainerForItemOverride()
Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
DependencyObject
GetItemByPath(string)
Gets a item by specifying a path to it.
Declaration
public RadTreeViewItem GetItemByPath(string path)
Parameters
path
The path to the item.
Returns
The item if found.
GetItemByPath(string, string)
Gets a item by specifying a path to it.
Declaration
public RadTreeViewItem GetItemByPath(string path, string separator)
Parameters
path
The path to the item.
separator
The path separator.
Returns
The item if found.
HideBetweenItemsDragCue()
Hides the drag cue that appears when a drop between two items is possible.
Declaration
[Obsolete("This method will be removed. It is not intended for third party usage.", false)]
public void HideBetweenItemsDragCue()
OnApplyTemplate()
Occurs when the template for the RadTreeView is applied, allowing for custom processing after the template has been applied.
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
OnDragEnded(RadTreeViewDragEndedEventArgs)
Raises the event.
Declaration
[Obsolete("This method will be removed. Use DragDropManager API to customize drag drop operations.", false)]
protected virtual void OnDragEnded(RadTreeViewDragEndedEventArgs e)
Parameters
e
The RadTreeViewDragEndedEventArgs instance containing the event data.
OnDragEnter(DragEventArgs)
Called when DragEnter Event is Raise.
Declaration
protected override void OnDragEnter(DragEventArgs e)
Parameters
e
DragEventArgs
Event args.
OnDragLeave(DragEventArgs)
Called when DragEnter Event is Raise.
Declaration
protected override void OnDragLeave(DragEventArgs e)
Parameters
e
DragEventArgs
Event args.
OnDragOverTree(DragOverTreeEventArgs)
Raises the event.
Declaration
[Obsolete("This method will be removed. Use DragDropManager API to customize drag drop operations.", false)]
protected virtual void OnDragOverTree(DragOverTreeEventArgs e)
Parameters
e
The DragOverTreeEventArgs instance containing the event data.
OnDragStarted(RadTreeViewDragEventArgs)
Raises the event.
Declaration
[Obsolete("This method will be removed. Use DragDropManager API to customize drag drop operations.", false)]
protected virtual void OnDragStarted(RadTreeViewDragEventArgs e)
Parameters
e
The RadTreeViewDragEventArgs instance containing the event data.
OnDrop(DragEventArgs)
Called when DragEnter Event is Raise.
Declaration
protected override void OnDrop(DragEventArgs e)
Parameters
e
DragEventArgs
Event args.
OnExpanderStyleChanged(Style, Style)
Propagates the changed expander style through tree's children. Called when the ExpanderStyleInherited property changes.
Declaration
protected virtual void OnExpanderStyleChanged(Style oldStyle, Style newStyle)
Parameters
oldStyle
Style
The old style.
newStyle
Style
The new style.
OnGotFocus(object, RoutedEventArgs)
Called when the TreeView or one of its items receive focus.
Declaration
[SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")]
protected virtual void OnGotFocus(object sender, RoutedEventArgs e)
Parameters
sender
The sender of the event.
e
RoutedEventArgs
The event arguments that will be passed to the GotFocus event.
OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
Declaration
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameters
e
KeyboardFocusChangedEventArgs
OnInitialized(EventArgs)
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
e
OnItemPrepared(RadTreeViewItemPreparedEventArgs)
Raises the event.
Declaration
protected virtual void OnItemPrepared(RadTreeViewItemPreparedEventArgs e)
Parameters
e
RadTreeViewItemPreparedEventArgs
The RadTreeViewDragEndedEventArgs instance containing the event data.
OnItemsChanged(NotifyCollectionChangedEventArgs)
Declaration
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
e
OnLostFocus(object, RoutedEventArgs)
Called when the TreeView or one of its items lose focus.
Declaration
[SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers")]
protected virtual void OnLostFocus(object sender, RoutedEventArgs e)
Parameters
sender
The sender of the event.
e
RoutedEventArgs
The event arguments that are passed to the LostFocus event.
OnLostKeyboardFocus(KeyboardFocusChangedEventArgs)
Declaration
protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameters
e
KeyboardFocusChangedEventArgs
OnMouseLeftButtonDown(MouseButtonEventArgs)
Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
e
MouseButtonEventArgs
OnMouseWheel(MouseWheelEventArgs)
Declaration
protected override void OnMouseWheel(MouseWheelEventArgs e)
Parameters
e
MouseWheelEventArgs
OnPreviewDragEnded(RadTreeViewDragEndedEventArgs)
Raises the event.
Declaration
[Obsolete("This method will be removed. Use DragDropManager API to customize drag drop operations.", false)]
protected virtual bool OnPreviewDragEnded(RadTreeViewDragEndedEventArgs e)
Parameters
e
The RadTreeViewDragEndedEventArgs instance containing the event data.
Returns
OnPreviewDragStarted(RadTreeViewDragEventArgs)
Raises the event.
Declaration
[Obsolete("This method will be removed. Use DragDropManager API to customize drag drop operations.", false)]
protected virtual bool OnPreviewDragStarted(RadTreeViewDragEventArgs e)
Parameters
e
The RadTreeViewDragEventArgs instance containing the event data.
Returns
OnPreviewSelectionChanged(SelectionChangedEventArgs)
This method is called when the PreviewSelectionChanged is raised.
Declaration
protected virtual bool OnPreviewSelectionChanged(SelectionChangedEventArgs e)
Parameters
e
SelectionChangedEventArgs
The event arguments with which the event will be called.
Returns
Returns whether the event was handled.
Remarks
Not calling the base method in overrides means that the PreviewSelectionChanged event will not be raised.
OnSelectionChanged(SelectionChangedEventArgs)
Raises the event.
Declaration
protected virtual void OnSelectionChanged(SelectionChangedEventArgs e)
Parameters
e
SelectionChangedEventArgs
The SelectionChangedEventArgs instance containing the event data.
OnTextInput(TextCompositionEventArgs)
Declaration
protected override void OnTextInput(TextCompositionEventArgs e)
Parameters
e
TextCompositionEventArgs
PrepareContainerForItemOverride(DependencyObject, object)
Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
element
DependencyObject
item
SelectItemByPath(string)
Adds the item with the given path to the collection of selected items. The path separator is "".
Declaration
public void SelectItemByPath(string path)
Parameters
path
A unique path for the item, normally made up of IDs.
SelectItemByPath(string, string)
Adds the item with the given path to the collection of selected items. The path separator is "".
ShowBetweenItemsDragCue(RadTreeViewItem)
Shows the DragCue that appears when a drop between two items is possible.
Declaration
[Obsolete("This method will be removed. It is not intended for third party usage.", false)]
public void ShowBetweenItemsDragCue(RadTreeViewItem dropDestination)
Parameters
dropDestination
The relative drop position. In this method only DropPosition.Before and DropPosition.After make sense.
UpdateDropPreviewLine(RadTreeViewItem, DropPosition)
Updates the drop preview line position and visibility while dragging.
Declaration
public void UpdateDropPreviewLine(RadTreeViewItem dropDestination, DropPosition dropPosition)
Parameters
dropDestination
dropPosition
Events
Checked
Occurs when a child TreeView item has been checked.
Declaration
public event EventHandler<RadRoutedEventArgs> Checked
Event Value
Collapsed
Occurs when a child TreeView item has been collapsed.
Declaration
public event EventHandler<RadRoutedEventArgs> Collapsed
Event Value
DragEnded
Occurs when the drag has ended.
Declaration
[Obsolete("This event will be removed. Use DragDropManager API to customize drag drop operations.", false)]
public event RadTreeViewDragEndedEventHandler DragEnded
Event Value
DragOverTree
Occurs when the dragging over the tree view.
Declaration
[Obsolete("This event will be removed. Use DragDropManager API to customize drag drop operations.", false)]
public event DragOverTreeEventHandler DragOverTree
Event Value
DragStarted
Occurs when the drag has started.
Declaration
[Obsolete("This event will be removed. Use DragDropManager API to customize drag drop operations.", false)]
public event RadTreeViewDragEventHandler DragStarted
Event Value
EditCanceled
Raised when item editing has been canceled. This is a wrapper for the EditableHeaderedItemsControl.EditCanceled routed event.
Declaration
public event RadTreeViewItemEditedEventHandler EditCanceled
Event Value
EditStarted
Raised when the edit of an item has just started. This is a wrapper for the EditableHeaderedItemsControl.EditStarted routed event.
Declaration
public event RadTreeViewItemEditedEventHandler EditStarted
Event Value
Edited
Raised when the edit of an item has been committed.
Declaration
public event RadTreeViewItemEditedEventHandler Edited
Event Value
Expanded
Occurs when a child TreeView item has been expanded.
Declaration
public event EventHandler<RadRoutedEventArgs> Expanded
Event Value
ItemClick
Occurs when a child TreeView item has been clicked.
Declaration
public event EventHandler<RadRoutedEventArgs> ItemClick
Event Value
ItemDoubleClick
Occurs when a child TreeView item has been double clicked.
Declaration
public event EventHandler<RadRoutedEventArgs> ItemDoubleClick
Event Value
ItemPrepared
Occurs when a child RadTreeViewItem has been prepared and is ready for use.
Declaration
public event EventHandler<RadTreeViewItemPreparedEventArgs> ItemPrepared
Event Value
Remarks
Use it to perform binding of RadTreeViewItem properties to the data objects.
LoadOnDemand
Occurs when a child TreeView item is loading its child items on demand. See the IsLoadOnDemandEnabled property.
Declaration
public event EventHandler<RadRoutedEventArgs> LoadOnDemand
Event Value
PreviewChecked
Occurs before a child TreeView item is checked.
Declaration
public event EventHandler<RadRoutedEventArgs> PreviewChecked
Event Value
PreviewCollapsed
Occurs before a child TreeView item is collapsed.
Declaration
public event EventHandler<RadRoutedEventArgs> PreviewCollapsed
Event Value
PreviewDragEnded
Occurs before the drag has been ended.
Declaration
[Obsolete("This event will be removed. Use DragDropManager API to customize drag drop operations.", false)]
public event RadTreeViewDragEndedEventHandler PreviewDragEnded
Event Value
PreviewDragStarted
Occurs before the drag is started.
Declaration
[Obsolete("This event will be removed. Use DragDropManager API to customize drag drop operations.", false)]
public event RadTreeViewDragEventHandler PreviewDragStarted
Event Value
PreviewEditCanceled
Raised just before item editing has been canceled. This is a wrapper for the EditableHeaderedItemsControl.PreviewEditCanceled routed event.
Declaration
public event RadTreeViewItemEditedEventHandler PreviewEditCanceled
Event Value
PreviewEditStarted
Raised just before editing of an item has started. This is a wrapper for the EditableHeaderedItemsControl.PreviewEditStarted routed event.
Declaration
public event RadTreeViewItemEditedEventHandler PreviewEditStarted
Event Value
PreviewEdited
Occurs before a TreeView item to accept the new Edited data.
Declaration
public event RadTreeViewItemEditedEventHandler PreviewEdited
Event Value
PreviewExpanded
Occurs before a child TreeView item is expanded.
Declaration
public event EventHandler<RadRoutedEventArgs> PreviewExpanded
Event Value
PreviewSelected
Occurs before a child tree view item is selected.
Declaration
public event EventHandler<RadRoutedEventArgs> PreviewSelected
Event Value
PreviewSelectionChanged
Raised just before the selected items collection has changed.
Declaration
public event SelectionChangedEventHandler PreviewSelectionChanged
Event Value
SelectionChangedEventHandler
PreviewUnchecked
Occurs before a child TreeView item is unchecked.
Declaration
public event EventHandler<RadRoutedEventArgs> PreviewUnchecked
Event Value
PreviewUnselected
Occurs before a child tree view item is unselected.
Declaration
public event EventHandler<RadRoutedEventArgs> PreviewUnselected
Event Value
Selected
Occurs when a child RadTreeView item has been selected.
Declaration
public event EventHandler<RadRoutedEventArgs> Selected
Event Value
SelectionChanged
Occurs after the value of the SelectedItems property of a tree is changed.
Declaration
public event SelectionChangedEventHandler SelectionChanged
Event Value
SelectionChangedEventHandler
Unchecked
Occurs when a child TreeView item has been unchecked.
Declaration
public event EventHandler<RadRoutedEventArgs> Unchecked
Event Value
Unselected
Occurs when a child tree view item has been unselected.
Declaration
public event EventHandler<RadRoutedEventArgs> Unselected
Event Value