C# Customizing Context Menu of KetticTreeView
KetticTreeView control expands the functionality through adding context menus to any nodes, as well as adding different context menus to each node in the tree view. Moreover, this control also supports the customization of the context menu and allows the users to modify the style and appearance of a single context menu. The following C# tutorial shows how to create custom context menu for KetticTreeView.
C# API for Customizing Context Menu of KetticTreeView
KetticTreeView contains the C# API for the developers to easily customize the context menu of nodes. This is achieved by using the OpeningContextMenu event. The following are the properties of this event for customizing the context menu in C# Windows Forms application.
Access Context Menu Items for Customization
KetticTreeView control allows the users to display, hide, enable, and disable the items of the context menu in C#.NET. This is achieved through the Name property, which is capable of applying the custom TreeView. The following are the items of the context menu and the name values. C# Remove Items based on Nodes Level and DataBoundItem
In the following example, we are going to hide the Delete menu item and New menu item for the nodes of KetticTreeView bound to a DataTable where there are the ID, Name, IsSystemItem and ParendID fields. The records in the table refer to each other according to the ID-ParentID relation and the KetticTreeView node will display the Name property of the records. The C# code below demonstrates how to implement the customization for context menu item of node in TreeView.
|
UI Controlsfor Windows Forms .NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI DesignWinForms UI Controls WinForms Buttons UI Control WinForms Calendar UI ControlWinForms Carousel UI ControlWinForms Chart UI ControlWinForms Clock UI ControlCommandBar UI ControlWinForms Dock UI ControlDesktop Alert UI ControlDropDown List UI ControlWinForms Editor UI ControlForms and Dialogs UI ControlWinForms GridView UI ControlWinForms ListView UI ControlWinForms Menu UI ControlWinForms ComboBox UI ControlWinForms PageView UI ControlPanels and Labels UI ControlWinForms Panorama UI ControlWinForms PDFViewer UI ControlWinForms Property Grid UI ControlWinForms Ribbon UI ControlWinForms PivotGrid UI ControlWinForms RichTextBox UI ControlWinForms Rotator UI ControlWinForms Scheduler UI ControlWinForms Shortcuts UI ControlWinForms SpellChecker UI ControlWinForms Track & Status UI ControlWinForms TreeView UI ControlKeyboard SupportDesign Time SupportBuild PropertyContext MenuTreeView - NodeAdd & Remove NodesReorder NodesFormat NodesEdit NodesSelect NodesFilter NodesCustom Filter NodesSort NodesCustom Sort NodesFind Sort NodesData BindingBasicsDatabaseXML DataDrag and DropCustomizationContext MenuCustomizationAssign ScreenTipLocalizationWinForms Wizard UI ControlWinForms Test UI ControlWinForms Theme UI Control |