Context Menu in Windows Forms Diagram
3 Sep 2020 / 1 minute to read
Built-in context menu
The Essential Diagram of Windows Forms provides built-in context menu support to the Diagram.
All available tools for the Diagram control such as File options, Edit options, Action options, Layout, Connectors, and Shapes are listed in the built-in context menu.
Use Case Scenarios
This feature enables easy access of frequently used options.
Properties_
Property | Description | Type | Data Type | Reference links |
---|---|---|---|---|
Used to enable default context menu. | NA | Boolean | NA |
Enabling Default Context Menu
You can enable the default context menu using the DefaultContextMenuEnabled property.
The following code illustrates how to enable the default context menu:
//show default context menu
diagram1.DefaultContextMenuEnabled = true;
'show default context menu
diagram1.DefaultContextMenuEnabled = True
The following code illustrates how to disable the default context menu:
//hide default context menu
diagram1.DefaultContextMenuEnabled = false;
'hide default context menu
diagram1.DefaultContextMenuEnabled = False
Sample Link
To view a sample:
- Open the Syncfusion Dashboard.
- Click the Windows Forms drop-down list and select Run Locally Installed Samples.
- Navigate to Diagram Samples > Product Showcase > Diagram Builder.
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page