New to Telerik UI for WinForms? Start a free 30-day trial

Provides the built-in TreeView context-menu actions and dispatches them to the owning element.

Definition

Constructors

Creates the built-in edit, expand/collapse, add, delete, cut, copy, and paste menu items for a tree.

C#
public TreeViewDefaultContextMenu(RadTreeViewElement treeView)
Parameters:treeViewRadTreeViewElement

The element whose selected node is acted on by the menu.

Properties

Gets the menu item that adds a new node under the context-menu target, or at the root when no node was targeted.

C#
public TreeViewMenuItem AddMenuItem { get; }

Gets the menu item that copies the selected node's text to the clipboard.

C#
public TreeViewMenuItem CopyMenuItem { get; }

Because the default menu is recreated when opened, a later paste creates a text-only node instead of restoring the clone's hierarchy or other state.

Gets the menu item that copies the selected node's text to the clipboard and removes it when removal is allowed and the tree is not editing.

C#
public TreeViewMenuItem CutMenuItem { get; }

The default menu is recreated when opened, so a later paste creates a text-only node instead of restoring the removed node's hierarchy or other state.

Gets the menu item that removes the selected node when removal is allowed and the tree is not editing.

C#
public TreeViewMenuItem DeleteMenuItem { get; }

Gets the menu item that starts editing the selected node.

C#
public TreeViewMenuItem EditMenuItem { get; }

Gets the menu item that toggles the selected node's expanded state.

C#
public TreeViewMenuItem ExpandCollapseMenuItem { get; }

Gets the menu item that creates a node from clipboard text under the selected node, or at the root when there is no selection.

C#
public TreeViewMenuItem PasteMenuItem { get; }

In the default menu flow, reopening the menu after Cut or Copy creates a new menu instance, so Paste does not restore the stored node or clone.

Methods

Detaches click handlers and disposes the built-in menu items before delegating to the base menu.

C#
protected override void Dispose(bool disposing)
Parameters:disposingbool

The disposal state forwarded to the base implementation.

Overrides: RadContextMenu.Dispose(bool)