Gets or sets the main automation context menu.
public ContextMenu ContextMenu {get; set;}
Public Property ContextMenu As ContextMenu
The main automation context menu
This is the menu that appears when the user clicks anywhere on a container but not on any of the objects currently in the container. You can directly manipulate this context menu or set your own System.Windows.Forms.ContextMenu derived class if desired.
This example adds a "Test" menu item to the main automation context menu.
using Leadtools;
using Leadtools.Annotations;
using Leadtools.WinForms;
using Leadtools.Codecs;
public void AnnAutomationManager_ContextMenu(AnnAutomationManager manager)
{
ContextMenu cm = manager.ContextMenu;
// add a separator
cm.MenuItems.Add("-");
// add a test menu item
cm.MenuItems.Add("Test", new EventHandler(MyTestMenuItemHandler));
}
private void MyTestMenuItemHandler(object sender, EventArgs e)
{
MessageBox.Show("Test clicked");
}
Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.WinForms
Imports Leadtools.Codecs
Public Sub AnnAutomationManager_ContextMenu(ByVal manager As AnnAutomationManager)
Dim cm As ContextMenu = manager.ContextMenu
' add a separator
cm.MenuItems.Add("-")
' add a test menu item
cm.MenuItems.Add("Test", New EventHandler(AddressOf MyTestMenuItemHandler))
End Sub
Private Sub MyTestMenuItemHandler(ByVal sender As Object, ByVal e As EventArgs)
MessageBox.Show("Test clicked")
End Sub
![]() |
Products |
Support |
Feedback: ContextMenu Property (AnnAutomationManager) - Leadtools.Annotations |
Introduction |
Help Version 19.0.2017.6.20
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.