All Controls
Edit Context Menu
The context menu of the controls is used to allow users to graphically edit parts of the charts. The menu changes based upon what the user clicks upon.
The default context menu is shown below:
Add a New Menu Item
At times, it may be necessary to add a new menu item to the context menu. This section describes the process of adding an item.
First, we need to include the necessary namespaces
for the controls. In the examples below, a menu item is added to an Individuals chart (named indChart in the examples below). The process is similar for the other charts:
[Visual Basic]
' Add a new menu item
Dim tsiMenuOption As New ToolStripMenuItem("New Item")
indChart.ContextMenuStrip.Items.Add(tsiMenuOption)
[Visual C#]
// Add a new menu item
ToolStripItem tsiMenuOption = new ToolStripMenuItem("New Item");
indChart.ContextMenuStrip.Items.Add(tsiMenuOption);
After the menu item has been added, the context menu should look similar to the following: