Class
RadTreeViewItem

Represents an item in the RadTreeView control.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Navigation")]
public class RadTreeViewItem : EditableHeaderedItemsControl, ICommandSource

Inheritance: objectEditableHeaderedItemsControlRadTreeViewItem

Derived Classes: FileBrowserTreeViewItemRadPanelBarItem

Implements: ICommandSource

Inherited Members EditableHeaderedItemsControl.EditedEventEditableHeaderedItemsControl.EditCanceledEventEditableHeaderedItemsControl.PreviewEditCanceledEventEditableHeaderedItemsControl.PreviewEditedEventEditableHeaderedItemsControl.PreviewEditStartedEventEditableHeaderedItemsControl.EditStartedEventEditableHeaderedItemsControl.PreviewEditorPrepareEventEditableHeaderedItemsControl.EditorPrepareEventEditableHeaderedItemsControl.IsInEditModePropertyEditableHeaderedItemsControl.HeaderEditTemplateSelectorPropertyEditableHeaderedItemsControl.HeaderEditTemplatePropertyEditableHeaderedItemsControl.IsEditablePropertyEditableHeaderedItemsControl.AddEditStartedHandler(UIElement, RadTreeViewItemEditedEventHandler)EditableHeaderedItemsControl.RemoveEditStartedHandler(UIElement, RadTreeViewItemEditedEventHandler)EditableHeaderedItemsControl.AddEditCanceledHandler(UIElement, RadTreeViewItemEditedEventHandler)EditableHeaderedItemsControl.RemoveEditCanceledHandler(UIElement, RadTreeViewItemEditedEventHandler)EditableHeaderedItemsControl.AddEditedHandler(UIElement, RadTreeViewItemEditedEventHandler)EditableHeaderedItemsControl.RemoveEditedHandler(UIElement, RadTreeViewItemEditedEventHandler)EditableHeaderedItemsControl.AddPreviewEditStartedHandler(UIElement, RadTreeViewItemEditedEventHandler)EditableHeaderedItemsControl.RemovePreviewEditStartedHandler(UIElement, RadTreeViewItemEditedEventHandler)EditableHeaderedItemsControl.AddPreviewEditedHandler(UIElement, RadTreeViewItemEditedEventHandler)EditableHeaderedItemsControl.RemovePreviewEditedHandler(UIElement, RadTreeViewItemEditedEventHandler)EditableHeaderedItemsControl.AddPreviewEditorPrepareHandler(UIElement, EditorPrepareEventHandler)EditableHeaderedItemsControl.RemovePreviewEditorPrepareHandler(UIElement, EditorPrepareEventHandler)EditableHeaderedItemsControl.AddEditorPrepareHandler(UIElement, EditorPrepareEventHandler)EditableHeaderedItemsControl.RemoveEditorPrepareHandler(UIElement, EditorPrepareEventHandler)EditableHeaderedItemsControl.PrepareEditor(RadTreeViewItemEditedEventArgs)EditableHeaderedItemsControl.OnEditorPrepare(EditorPrepareEventArgs)EditableHeaderedItemsControl.GetEditValue()EditableHeaderedItemsControl.SetEditValue(object)EditableHeaderedItemsControl.OnPreviewEdited(RadTreeViewItemEditedEventArgs)EditableHeaderedItemsControl.OnEdited(RadTreeViewItemEditedEventArgs)EditableHeaderedItemsControl.OnEditCanceled(RadTreeViewItemEditedEventArgs)EditableHeaderedItemsControl.OnPreviewEditCanceled(RadTreeViewItemEditedEventArgs)EditableHeaderedItemsControl.OnEditStarted(RadTreeViewItemEditedEventArgs)EditableHeaderedItemsControl.OnPreviewEditStarted(RadTreeViewItemEditedEventArgs)EditableHeaderedItemsControl.OnHeaderEditTemplateChanged(DataTemplate, DataTemplate)EditableHeaderedItemsControl.OnHeaderEditTemplateSelectorChanged(DataTemplateSelector, DataTemplateSelector)EditableHeaderedItemsControl.IsInEditModeEditableHeaderedItemsControl.HeaderEditTemplateEditableHeaderedItemsControl.HeaderEditTemplateSelectorEditableHeaderedItemsControl.IsEditableEditableHeaderedItemsControl.HeaderEditPresenterElementEditableHeaderedItemsControl.EditStartedEditableHeaderedItemsControl.PreviewEditedEditableHeaderedItemsControl.EditCanceledEditableHeaderedItemsControl.PreviewEditCanceledEditableHeaderedItemsControl.EditedEditableHeaderedItemsControl.PreviewEditStartedEditableHeaderedItemsControl.PreviewEditorPrepareEditableHeaderedItemsControl.EditorPrepare

Constructors

RadTreeViewItem()

Initializes a new instance of the RadTreeViewItem class.

Declaration

cs-api-definition
public RadTreeViewItem()

Fields

CheckStateProperty

Identifies the CheckState dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CheckStateProperty

Field Value

DependencyProperty

CheckedEvent

Identifies the Checked routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent CheckedEvent

Field Value

RoutedEvent

ClickEvent

Identifies the Click routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent ClickEvent

Field Value

RoutedEvent

CollapsedEvent

Identifies the Collapsed routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent CollapsedEvent

Field Value

RoutedEvent

CommandExecutionTriggerProperty

Identifies the CommandExecutionTrigger dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CommandExecutionTriggerProperty

Field Value

DependencyProperty

CommandParameterProperty

Identifies the CommandParameter dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CommandParameterProperty

Field Value

DependencyProperty

CommandProperty

Identifies the ClickCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CommandProperty

Field Value

DependencyProperty

CommandTargetProperty

Identifies the CommandTarget dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CommandTargetProperty

Field Value

DependencyProperty

DefaultImageSrcProperty

Identifies the DefaultImageSrc dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DefaultImageSrcProperty

Field Value

DependencyProperty

DoubleClickEvent

Identifies the DoubleClick routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent DoubleClickEvent

Field Value

RoutedEvent

DropPositionProperty

Identifies the DropPosition property.

Declaration

cs-api-definition
public static readonly DependencyProperty DropPositionProperty

Field Value

DependencyProperty

ExpandedEvent

Identifies the Expanded routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent ExpandedEvent

Field Value

RoutedEvent

ExpandedImageSrcProperty

Identifies the ExpandedImageSrc dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ExpandedImageSrcProperty

Field Value

DependencyProperty

ExpanderButtonMinWidthProperty

Identifies the ExpanderButtonMinWidth dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ExpanderButtonMinWidthProperty

Field Value

DependencyProperty

ExpanderStyleProperty

Identifies the ExpanderStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ExpanderStyleProperty

Field Value

DependencyProperty

IsCheckBoxEnabledProperty

Identifies the IsCheckBoxEnabled dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsCheckBoxEnabledProperty

Field Value

DependencyProperty

IsCheckedProperty

Identifies the IsChecked property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsCheckedProperty

Field Value

DependencyProperty

IsDragOverProperty

Identifies the IsDragOver property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsDragOverProperty

Field Value

DependencyProperty

IsDropAllowedProperty

Identifies the IsDropAllowed dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsDropAllowedProperty

Field Value

DependencyProperty

IsExpandedProperty

Identifies the IsExpanded dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsExpandedProperty

Field Value

DependencyProperty

IsLoadOnDemandEnabledProperty

Identifies the IsLoadOnDemandEnabled dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsLoadOnDemandEnabledProperty

Field Value

DependencyProperty

IsLoadingOnDemandProperty

Identifies the IsLoadingOnDemand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsLoadingOnDemandProperty

Field Value

DependencyProperty

IsMouseOverHeaderProperty

Identifies the IsMouseOverHeader dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsMouseOverHeaderProperty

Field Value

DependencyProperty

IsSelectableProperty

Identifies the IsSelectable dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsSelectableProperty

Field Value

DependencyProperty

IsSelectedProperty

Identifies the IsSelected dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsSelectedProperty

Field Value

DependencyProperty

IsSelectionActiveProperty

Identifies the IsSelectionActive dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsSelectionActiveProperty

Field Value

DependencyProperty

IsSelectionActivePropertyKey

Identifies the IsSelectionActivePropertyKey dependency property.

Declaration

cs-api-definition
public static readonly DependencyPropertyKey IsSelectionActivePropertyKey

Field Value

DependencyPropertyKey

ItemVisibilityProperty

Identifies the ItemVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ItemVisibilityProperty

Field Value

DependencyProperty

LoadOnDemandEvent

Identifies the LoadOnDemand routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent LoadOnDemandEvent

Field Value

RoutedEvent

OptionTypeProperty

Identifies the OptionTypeProperty dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty OptionTypeProperty

Field Value

DependencyProperty

PreviewCheckedEvent

Identifies the PreviewChecked routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent PreviewCheckedEvent

Field Value

RoutedEvent

PreviewCollapsedEvent

Identifies the PreviewCollapsed routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent PreviewCollapsedEvent

Field Value

RoutedEvent

PreviewExpandedEvent

Identifies the PreviewExpanded routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent PreviewExpandedEvent

Field Value

RoutedEvent

PreviewSelectedEvent

Identifies the PreviewSelected routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent PreviewSelectedEvent

Field Value

RoutedEvent

PreviewUncheckedEvent

Identifies the PreviewUnchecked routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent PreviewUncheckedEvent

Field Value

RoutedEvent

PreviewUnselectedEvent

Identifies the PreviewUnselected routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent PreviewUnselectedEvent

Field Value

RoutedEvent

SelectedEvent

Identifies the Selected routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent SelectedEvent

Field Value

RoutedEvent

SelectedImageSrcProperty

Identifies the SelectedImageSrc dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectedImageSrcProperty

Field Value

DependencyProperty

UncheckedEvent

Identifies the Unchecked routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent UncheckedEvent

Field Value

RoutedEvent

UnselectedEvent

Identifies the Unselected routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent UnselectedEvent

Field Value

RoutedEvent

Properties

CheckState

Gets or sets the toggle state of the item - On, Off or Indeterminate.

Declaration

cs-api-definition
public ToggleState CheckState { get; set; }

Property Value

ToggleState

Command

Gets or sets the command for Click event of the RadTreeViewItem.

Declaration

cs-api-definition
public ICommand Command { get; set; }

Property Value

ICommand

The command.

CommandExecutionTrigger

Gets or sets a value indicating when the Command must be executed.

Declaration

cs-api-definition
public CommandExecutionTrigger CommandExecutionTrigger { get; set; }

Property Value

CommandExecutionTrigger

CommandParameter

Gets or sets the command parameter of the RadTreeViewItem.

Declaration

cs-api-definition
public object CommandParameter { get; set; }

Property Value

object

The command parameter.

CommandTarget

Gets or sets the command target of the RadTreeViewItem when using routed command.

Declaration

cs-api-definition
public IInputElement CommandTarget { get; set; }

Property Value

IInputElement

The command target.

DefaultImageSrc

Gets or sets the image that the TreeViewItem will display by default.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Src")]
public virtual object DefaultImageSrc { get; set; }

Property Value

object

DropPosition

Gets or sets the DropPosition for the current drop (Before, Inside, After). Setting this property only makes sense in a DragDrop handler.

Declaration

cs-api-definition
public DropPosition DropPosition { get; set; }

Property Value

DropPosition

ExpandedImageSrc

Gets or sets the image that the TreeViewItem will display when it is expanded.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Src")]
public object ExpandedImageSrc { get; set; }

Property Value

object

ExpanderButtonMinWidth

Gets or sets a value indicating the min width of the grid which hosts the expander button of the RadTreeViewItem.

Declaration

cs-api-definition
public double ExpanderButtonMinWidth { get; set; }

Property Value

double

ExpanderStyle

Gets or sets the style for the item's expand arrow.

Declaration

cs-api-definition
public Style ExpanderStyle { get; set; }

Property Value

Style

FullPath

Gets the path from the root tree item to the current tree item delimited with the PathSeparator specified by RadTreeView.

Declaration

cs-api-definition
[Browsable(false)]
public string FullPath { get; }

Property Value

string

Index

Gets the position of the tree item in the tree item collection.

Declaration

cs-api-definition
[Browsable(false)]
public int Index { get; }

Property Value

int

IsCheckBoxEnabled

Gets whether the tree item will display a check box.

Declaration

cs-api-definition
[Browsable(false)]
public bool IsCheckBoxEnabled { get; }

Property Value

bool

IsChecked

Gets or sets a value indicating whether the TreeView item is checked. Null means 'indeterminate'.

Declaration

cs-api-definition
public bool? IsChecked { get; set; }

Property Value

bool?

IsDragOver

Gets or sets a value indicating whether an item is being dragged over the TreeViewItem.

Declaration

cs-api-definition
[Browsable(false)]
public bool IsDragOver { get; set; }

Property Value

bool

IsDropAllowed

Gets or sets a value indicating whether the tree item can accept data that the user drags onto it.

Declaration

cs-api-definition
public bool IsDropAllowed { get; set; }

Property Value

bool

IsExpanded

Gets or sets a value indicating whether the TreeViewItem is in the expanded state.

Declaration

cs-api-definition
public bool IsExpanded { get; set; }

Property Value

bool

IsInSelectedPath

Gets a value indicating whether this item is in the selection path.

Declaration

cs-api-definition
public bool IsInSelectedPath { get; }

Property Value

bool

IsInViewport

Gets a value indicating whether the tree item is in ScrollViewer viewport.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
public bool IsInViewport { get; }

Property Value

bool

IsLoadOnDemandEnabled

Gets or sets a value indicating whether loading on demand is enabled.

Declaration

cs-api-definition
public bool IsLoadOnDemandEnabled { get; set; }

Property Value

bool

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.

IsLoadingOnDemand

Gets or sets whether the tree item is in loading on demand state.

Declaration

cs-api-definition
public bool IsLoadingOnDemand { get; set; }

Property Value

bool

Remarks

If the LoadOnDemand event is raised and there are no items to add, use IsLoadingOnDemand property and set it to false to stop the loading animation.

IsMouseOverHeader

Gets a value indicating whether the mouse cursor is over the item header.

Declaration

cs-api-definition
public bool IsMouseOverHeader { get; }

Property Value

bool

IsRootItem

Gets a value if the item is root item.

Declaration

cs-api-definition
[Browsable(false)]
public bool IsRootItem { get; }

Property Value

bool

IsSelectable

Gets or sets a value indicating whether the tree item can be selected. It can be selected via Mouse, keyboard or by using IsSelected property. However, this property does not prevent the selection via SelectedItem or SelectedItems property of RadTreeView. These properties accept object(s) and might be evaluated when the corresponding containers are not generated yet.

Declaration

cs-api-definition
public bool IsSelectable { get; set; }

Property Value

bool

IsSelected

Gets or sets a value indicating whether the tree item is in selected state.

Declaration

cs-api-definition
public bool IsSelected { get; set; }

Property Value

bool

IsSelectionActive

Gets whether the tree item selection is active - e.g. the item is selected and the TreeView is focused.

Declaration

cs-api-definition
[Browsable(false)]
public bool IsSelectionActive { get; }

Property Value

bool

Item

Gets the data item associated to the RadTreeViewItem.

Declaration

cs-api-definition
public object Item { get; }

Property Value

object

Remarks

Use this property to get the data item, that is associated with this RadTreeViewItem when the RadTreeView is populated using the ItemsSource property.

ItemVisibility

Gets or sets a value indicating when the item should be visible or not.

Declaration

cs-api-definition
public Visibility ItemVisibility { get; set; }

Property Value

Visibility

Level

Gets the zero-based depth of the tree item in the RadTreeView tree.

Declaration

cs-api-definition
[Browsable(false)]
public int Level { get; }

Property Value

int

NextItem

Gets the next available item. Used for traversal of the tree view.

Declaration

cs-api-definition
[Browsable(false)]
public RadTreeViewItem NextItem { get; }

Property Value

RadTreeViewItem

NextSiblingItem

Gets the next sibling tree item.

Declaration

cs-api-definition
[Browsable(false)]
public RadTreeViewItem NextSiblingItem { get; }

Property Value

RadTreeViewItem

OptionType

Gets or sets the type of the option element that the item displays.

Declaration

cs-api-definition
public OptionListType OptionType { get; set; }

Property Value

OptionListType

ParentItem

Gets the parent tree view item of the current tree view item.

Declaration

cs-api-definition
[Browsable(false)]
public RadTreeViewItem ParentItem { get; }

Property Value

RadTreeViewItem

ParentTreeView

Gets the parent tree view associated with the current tree view item.

Declaration

cs-api-definition
[Browsable(false)]
public RadTreeView ParentTreeView { get; }

Property Value

RadTreeView

PreviousItem

Gets the previous available item. Used for traversal of the tree view.

Declaration

cs-api-definition
[Browsable(false)]
public RadTreeViewItem PreviousItem { get; }

Property Value

RadTreeViewItem

PreviousSiblingItem

Gets the previous sibling tree item.

Declaration

cs-api-definition
[Browsable(false)]
public RadTreeViewItem PreviousSiblingItem { get; }

Property Value

RadTreeViewItem

RootItem

Gets the root parent item for this instance.

Declaration

cs-api-definition
public RadTreeViewItem RootItem { get; }

Property Value

RadTreeViewItem

SelectedImageSrc

Gets or sets the image that the TreeViewItem displays when it is selected.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Src")]
public object SelectedImageSrc { get; set; }

Property Value

object

Methods

BeginEdit()

Attempts to start editing the item.

Declaration

cs-api-definition
public override bool BeginEdit()

Returns

bool

Returns true if successful, false otherwise.

Overrides EditableHeaderedItemsControl.BeginEdit()

BringIndexIntoView(int)

Brings the item with the given index into view. The method will not work before the item containers have been generated.

Declaration

cs-api-definition
public void BringIndexIntoView(int index)

Parameters

index

int

The index of the item to be brought into view.

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

cs-api-definition
public void BringItemIntoView(object item)

Parameters

item

object

The item to be brought into view.

CancelEdit()

Cancels the edit.

Declaration

cs-api-definition
public override bool CancelEdit()

Returns

bool

Overrides EditableHeaderedItemsControl.CancelEdit()

ChangeVisualState(bool)

Updates the visual state of the control.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
[SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "useTransitions")]
protected override void ChangeVisualState(bool useTransitions)

Parameters

useTransitions

bool

Indicates whether transitions should be used.

Overrides EditableHeaderedItemsControl.ChangeVisualState(bool)

ClearContainerForItemOverride(DependencyObject, object)

When overridden in a derived class, undoes the effects of the method.

Declaration

cs-api-definition
protected override void ClearContainerForItemOverride(DependencyObject element, object item)

Parameters

element

DependencyObject

The container element.

item

object

The Item.

CollapseAll()

Collapses the item and its child items recursively.

Declaration

cs-api-definition
public void CollapseAll()

CommitEdit()

Tries to Commit edit.

Declaration

cs-api-definition
public override bool CommitEdit()

Returns

bool

Returns true if successful, false otherwise.

Overrides EditableHeaderedItemsControl.CommitEdit()

Contains(RadTreeViewItem)

Checks if the item has a particular item in its collection.

Declaration

cs-api-definition
public bool Contains(RadTreeViewItem item)

Parameters

item

RadTreeViewItem

The item to be searched.

Returns

bool

Boolean value indicating the item to be searched.

EnsureVisible()

Ensures that a given item is displayed.

Declaration

cs-api-definition
public void EnsureVisible()

ExpandAll()

Expands the item and its child items recursively.

Declaration

cs-api-definition
public void ExpandAll()

Remarks

If a child item is not generated it will be expanded once it is generated.

GetContainerForItemOverride()

Creates or identifies the element that is used to display the given item.

Declaration

cs-api-definition
protected override DependencyObject GetContainerForItemOverride()

Returns

DependencyObject

IsBefore(RadTreeViewItem)

Gets a value indicating whether this item is rendered before the passed item.

Declaration

cs-api-definition
public bool IsBefore(RadTreeViewItem item)

Parameters

item

RadTreeViewItem

Returns

bool

IsDropPossible(IEnumerable)

Gets whether the the collection of dragged items can be dropped on the destination item.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Justification = "It will be refactored.")]
public virtual bool IsDropPossible(IEnumerable draggedItems)

Parameters

draggedItems

IEnumerable

A collection of items that the user is dragging.

Returns

bool

True if a drop is possible, false otherwise.

Remarks

The method makes sure that parents will not be dropped in their children and that no items will be dropped in a destination which has its IsDropAllowed property set to false.

This method is not meant to implement business or application logic. The DragDrop events can be handled to implement additional validation / logic.

IsItemItsOwnContainerOverride(object)

Determines if the specified item is (or is eligible to be) its own container.

Declaration

cs-api-definition
protected override bool IsItemItsOwnContainerOverride(object item)

Parameters

item

object

The item to check.

Returns

bool

True if the item is (or is eligible to be) its own container; otherwise, false.

MeasureOverride(Size)

Measures the size of the control.

Declaration

cs-api-definition
protected override Size MeasureOverride(Size availableSize)

Parameters

availableSize

Size

Returns

Size

OnApplyTemplate()

Called to apply the template to the RadTreeViewItem. This method is responsible for performing any necessary operations when the control's visual tree is generated.

Declaration

cs-api-definition
public override void OnApplyTemplate()

Overrides EditableHeaderedItemsControl.OnApplyTemplate()

Remarks

This method is typically overridden in derived classes to implement custom template application logic.

OnChecked(RadTreeViewCheckEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnChecked(RadTreeViewCheckEventArgs e)

Parameters

e

RadTreeViewCheckEventArgs

The RadTreeViewCheckEventArgs instance containing the event data.

OnClick(RadRoutedEventArgs)

Raises the event and tries to execute the .

Declaration

cs-api-definition
protected virtual bool? OnClick(RadRoutedEventArgs e)

Parameters

e

RadRoutedEventArgs

Returns

bool?

True if the command is executed; False if the command can not be executed; Null when command is not set or suppressing notifications.

OnCollapsed(RadRoutedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnCollapsed(RadRoutedEventArgs e)

Parameters

e

RadRoutedEventArgs

OnCreateAutomationPeer()

Returns class-specific AutomationPeer.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

The type-specific AutomationPeer implementation.

OnDoubleClick(RadRoutedEventArgs)

Raises the event and tries to execute the .

Declaration

cs-api-definition
protected virtual bool? OnDoubleClick(RadRoutedEventArgs e)

Parameters

e

RadRoutedEventArgs

Returns

bool?

True if the command is executed; False if the command can not be executed; Null when command is not set or suppressing notifications.

OnExpanded(RadRoutedEventArgs)

Raise the event.

Declaration

cs-api-definition
protected virtual void OnExpanded(RadRoutedEventArgs e)

Parameters

e

RadRoutedEventArgs

OnGotFocus(RoutedEventArgs)

Called before the event occurs.

Declaration

cs-api-definition
protected override void OnGotFocus(RoutedEventArgs e)

Parameters

e

RoutedEventArgs

The data for the event.

OnHeaderChanged(object, object)

Called when the property of a changes.

Declaration

cs-api-definition
protected override void OnHeaderChanged(object oldHeader, object newHeader)

Parameters

oldHeader

object

Old value of the property.

newHeader

object

New value of the property.

OnHeaderEditElementKeyDown(object, KeyEventArgs)

Called when KeyDown event occurs on the Header Edit Element.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Security", "CA2109:ReviewVisibleEventHandlers", Justification = "There is no need to make the emthod private.")]
protected virtual void OnHeaderEditElementKeyDown(object sender, KeyEventArgs e)

Parameters

sender

object

The sender.

e

KeyEventArgs

The KeyEventArgs instance containing the event data.

OnInitialized(EventArgs)

Raises the event. This method is invoked whenever is set to true internally.

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

OnIsEnabledChanged(object, DependencyPropertyChangedEventArgs)

The handler for the IsEnabledChanged event is fired.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "e", Justification = "This is a standard name for event arguments")]
[SuppressMessage("Microsoft.Design", "CA1061:DoNotHideBaseClassMethods", Justification = "This is an instance method and not a static method, there should be no confusion")]
protected virtual void OnIsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)

Parameters

sender

object

The sender.

e

DependencyPropertyChangedEventArgs

The DependencyPropertyChangedEventArgs instance containing the event data.

OnIsExpandedChanged(bool, bool)

Called when the value of the IsExpanded property changes.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
protected virtual void OnIsExpandedChanged(bool oldValue, bool newValue)

Parameters

oldValue

bool

The old value of the IsExpanded property.

newValue

bool

The new value of the IsExpanded property.

OnIsInEditModeChanged(bool, bool)

Called when the value of the IsInEditMode property changes.

Declaration

cs-api-definition
protected override void OnIsInEditModeChanged(bool oldValue, bool newValue)

Parameters

oldValue

bool

newValue

bool

Overrides EditableHeaderedItemsControl.OnIsInEditModeChanged(bool, bool)

OnItemsChanged(NotifyCollectionChangedEventArgs)

Invoked when the Items property changes.

Declaration

cs-api-definition
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)

Parameters

e

NotifyCollectionChangedEventArgs

OnKeyDown(KeyEventArgs)

Called before the event occurs.

Declaration

cs-api-definition
protected override void OnKeyDown(KeyEventArgs e)

Parameters

e

KeyEventArgs

The data for the event.

OnLoadOnDemand(RadRoutedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnLoadOnDemand(RadRoutedEventArgs e)

Parameters

e

RadRoutedEventArgs

The RadRoutedEventArgs instance containing the event data.

OnLostFocus(RoutedEventArgs)

Called before the event occurs.

Declaration

cs-api-definition
protected override void OnLostFocus(RoutedEventArgs e)

Parameters

e

RoutedEventArgs

The data for the event.

OnPreviewChecked(RadTreeViewCheckEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual bool OnPreviewChecked(RadTreeViewCheckEventArgs e)

Parameters

e

RadTreeViewCheckEventArgs

The RadRoutedEventArgs instance containing the event data.

Returns

bool

OnPreviewCollapsed(RadRoutedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual bool OnPreviewCollapsed(RadRoutedEventArgs e)

Parameters

e

RadRoutedEventArgs

The RadRoutedEventArgs instance containing the event data.

Returns

bool

OnPreviewEditorPrepare(EditorPrepareEventArgs)

Prepares the editor for the TreeViewItem. This override binds the default TextBox to the property that is edited if necessary.

Declaration

cs-api-definition
protected override void OnPreviewEditorPrepare(EditorPrepareEventArgs e)

Parameters

e

EditorPrepareEventArgs

The event arguments that will be passed to the PreviewEditorPrepare in the base implementation.

Overrides EditableHeaderedItemsControl.OnPreviewEditorPrepare(EditorPrepareEventArgs)

OnPreviewExpanded(RadRoutedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual bool OnPreviewExpanded(RadRoutedEventArgs e)

Parameters

e

RadRoutedEventArgs

The RadRoutedEventArgs instance containing the event data.

Returns

bool

OnPreviewSelected(RadRoutedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual bool OnPreviewSelected(RadRoutedEventArgs e)

Parameters

e

RadRoutedEventArgs

The RadRoutedEventArgs instance containing the event data.

Returns

bool

OnPreviewUnchecked(RadTreeViewCheckEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual bool OnPreviewUnchecked(RadTreeViewCheckEventArgs e)

Parameters

e

RadTreeViewCheckEventArgs

The EventArgs instance containing the event data.

Returns

bool

OnPreviewUnselected(RadRoutedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual bool OnPreviewUnselected(RadRoutedEventArgs e)

Parameters

e

RadRoutedEventArgs

The RadRoutedEventArgs instance containing the event data.

Returns

bool

OnSelected(RadRoutedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnSelected(RadRoutedEventArgs e)

Parameters

e

RadRoutedEventArgs

The RadRoutedEventArgs instance containing the event data.

OnUnchecked(RadTreeViewCheckEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnUnchecked(RadTreeViewCheckEventArgs e)

Parameters

e

RadTreeViewCheckEventArgs

The RadTreeViewCheckEventArgs instance containing the event data.

OnUnselected(RadRoutedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnUnselected(RadRoutedEventArgs e)

Parameters

e

RadRoutedEventArgs

The RadRoutedEventArgs instance containing the event data.

PrepareContainerForItemOverride(DependencyObject, object)

Prepares the specified element to display the specified item.

Declaration

cs-api-definition
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)

Parameters

element

DependencyObject

Element used to display the specified item.

item

object

Specified item.

ToString()

Return item text value.

Declaration

cs-api-definition
public override string ToString()

Returns

string

The text of the item.

Events

Checked

Occurs when the item is checked.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> Checked

Event Value

EventHandler<RadRoutedEventArgs>

Click

Occurs after the tree item is clicked.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> Click

Event Value

EventHandler<RadRoutedEventArgs>

Collapsed

Occurs after the tree item is collapsed.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> Collapsed

Event Value

EventHandler<RadRoutedEventArgs>

DoubleClick

Occurs after the tree item is double clicked.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> DoubleClick

Event Value

EventHandler<RadRoutedEventArgs>

Expanded

Occurs after the tree item is expanded.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> Expanded

Event Value

EventHandler<RadRoutedEventArgs>

LoadOnDemand

Occurs when the tree item should load its child items on demand.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> LoadOnDemand

Event Value

EventHandler<RadRoutedEventArgs>

PreviewChecked

Occurs before the tree item is checked.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> PreviewChecked

Event Value

EventHandler<RadRoutedEventArgs>

PreviewCollapsed

Occurs before an item is collapsed.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> PreviewCollapsed

Event Value

EventHandler<RadRoutedEventArgs>

PreviewExpanded

Occurs before an item is expanded.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> PreviewExpanded

Event Value

EventHandler<RadRoutedEventArgs>

PreviewSelected

Occurs before the tree item is selected.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> PreviewSelected

Event Value

EventHandler<RadRoutedEventArgs>

PreviewUnchecked

Occurs before the tree item is unchecked.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> PreviewUnchecked

Event Value

EventHandler<RadRoutedEventArgs>

PreviewUnselected

Occurs before an item is unselected.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> PreviewUnselected

Event Value

EventHandler<RadRoutedEventArgs>

Selected

Occurs after the tree item is selected. For more information about handling events, see also PreviewSelected.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> Selected

Event Value

EventHandler<RadRoutedEventArgs>

Unchecked

Occurs when the item is unchecked.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> Unchecked

Event Value

EventHandler<RadRoutedEventArgs>

Unselected

Occurs after the tree item is unselected.

Declaration

cs-api-definition
public event EventHandler<RadRoutedEventArgs> Unselected

Event Value

EventHandler<RadRoutedEventArgs>

In this article
DefinitionConstructorsRadTreeViewItem()FieldsCheckStatePropertyCheckedEventClickEventCollapsedEventCommandExecutionTriggerPropertyCommandParameterPropertyCommandPropertyCommandTargetPropertyDefaultImageSrcPropertyDoubleClickEventDropPositionPropertyExpandedEventExpandedImageSrcPropertyExpanderButtonMinWidthPropertyExpanderStylePropertyIsCheckBoxEnabledPropertyIsCheckedPropertyIsDragOverPropertyIsDropAllowedPropertyIsExpandedPropertyIsLoadOnDemandEnabledPropertyIsLoadingOnDemandPropertyIsMouseOverHeaderPropertyIsSelectablePropertyIsSelectedPropertyIsSelectionActivePropertyIsSelectionActivePropertyKeyItemVisibilityPropertyLoadOnDemandEventOptionTypePropertyPreviewCheckedEventPreviewCollapsedEventPreviewExpandedEventPreviewSelectedEventPreviewUncheckedEventPreviewUnselectedEventSelectedEventSelectedImageSrcPropertyUncheckedEventUnselectedEventPropertiesCheckStateCommandCommandExecutionTriggerCommandParameterCommandTargetDefaultImageSrcDropPositionExpandedImageSrcExpanderButtonMinWidthExpanderStyleFullPathIndexIsCheckBoxEnabledIsCheckedIsDragOverIsDropAllowedIsExpandedIsInSelectedPathIsInViewportIsLoadOnDemandEnabledIsLoadingOnDemandIsMouseOverHeaderIsRootItemIsSelectableIsSelectedIsSelectionActiveItemItemVisibilityLevelNextItemNextSiblingItemOptionTypeParentItemParentTreeViewPreviousItemPreviousSiblingItemRootItemSelectedImageSrcMethodsBeginEdit()BringIndexIntoView(int)BringItemIntoView(object)CancelEdit()ChangeVisualState(bool)ClearContainerForItemOverride(DependencyObject, object)CollapseAll()CommitEdit()Contains(RadTreeViewItem)EnsureVisible()ExpandAll()GetContainerForItemOverride()IsBefore(RadTreeViewItem)IsDropPossible(IEnumerable)IsItemItsOwnContainerOverride(object)MeasureOverride(Size)OnApplyTemplate()OnChecked(RadTreeViewCheckEventArgs)OnClick(RadRoutedEventArgs)OnCollapsed(RadRoutedEventArgs)OnCreateAutomationPeer()OnDoubleClick(RadRoutedEventArgs)OnExpanded(RadRoutedEventArgs)OnGotFocus(RoutedEventArgs)OnHeaderChanged(object, object)OnHeaderEditElementKeyDown(object, KeyEventArgs)OnInitialized(EventArgs)OnIsEnabledChanged(object, DependencyPropertyChangedEventArgs)OnIsExpandedChanged(bool, bool)OnIsInEditModeChanged(bool, bool)OnItemsChanged(NotifyCollectionChangedEventArgs)OnKeyDown(KeyEventArgs)OnLoadOnDemand(RadRoutedEventArgs)OnLostFocus(RoutedEventArgs)OnPreviewChecked(RadTreeViewCheckEventArgs)OnPreviewCollapsed(RadRoutedEventArgs)OnPreviewEditorPrepare(EditorPrepareEventArgs)OnPreviewExpanded(RadRoutedEventArgs)OnPreviewSelected(RadRoutedEventArgs)OnPreviewUnchecked(RadTreeViewCheckEventArgs)OnPreviewUnselected(RadRoutedEventArgs)OnSelected(RadRoutedEventArgs)OnUnchecked(RadTreeViewCheckEventArgs)OnUnselected(RadRoutedEventArgs)PrepareContainerForItemOverride(DependencyObject, object)ToString()EventsCheckedClickCollapsedDoubleClickExpandedLoadOnDemandPreviewCheckedPreviewCollapsedPreviewExpandedPreviewSelectedPreviewUncheckedPreviewUnselectedSelectedUncheckedUnselected
Not finding the help you need?
Contact Support