Provides the built-in TreeView context-menu actions and dispatches them to the owning element.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class TreeViewDefaultContextMenu : RadContextMenu, IComponent, IDisposable, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentRadContextMenuTreeViewDefaultContextMenu
Implements:
Inherited Members
Constructors
Creates the built-in edit, expand/collapse, add, delete, cut, copy, and paste menu items for a tree.
public TreeViewDefaultContextMenu(RadTreeViewElement treeView)
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.
public TreeViewMenuItem AddMenuItem { get; }
Gets the menu item that copies the selected node's text to the clipboard.
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.
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.
public TreeViewMenuItem DeleteMenuItem { get; }
Gets the menu item that starts editing the selected node.
public TreeViewMenuItem EditMenuItem { get; }
Gets the menu item that toggles the selected node's expanded state.
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.
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.
protected override void Dispose(bool disposing)
The disposal state forwarded to the base implementation.
Overrides: