Error processing SSI file
LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly)

Show in webframe

ContextMenu Property (AnnAutomationManager)






Gets or sets the main automation context menu.
Syntax
public ContextMenu ContextMenu {get; set;}
'Declaration
 
Public Property ContextMenu As ContextMenu
'Usage
 
Dim instance As AnnAutomationManager
Dim value As ContextMenu
 
instance.ContextMenu = value
 
value = instance.ContextMenu

            

            
public:
property ContextMenu^ ContextMenu {
   ContextMenu^ get();
   void set (    ContextMenu^ value);
}

Property Value

The main automation context menu
Remarks
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.Controls.ContextMenu derived class if desired.
Example

This example adds a "Test" menu item to the main automation context menu.

Copy Code  
Imports Leadtools.Windows.Controls
Imports Leadtools.Windows.Annotations

Private Sub AnnAutomationManager_ContextMenu(ByVal manager As AnnAutomationManager)
   Dim cm As ContextMenu = manager.ContextMenu
   ' add a separator
   cm.Items.Add(New Separator())
   ' add a test menu item
   Dim mi As MenuItem = New MenuItem()
   mi.Header = "Test"
   AddHandler mi.Click, AddressOf MyTestMenuItemHandler
   cm.Items.Add(mi)
End Sub
Private Sub MyTestMenuItemHandler(ByVal sender As Object, ByVal e As RoutedEventArgs)
   MessageBox.Show("Test clicked")
End Sub
using Leadtools.Windows.Controls;
using Leadtools.Windows.Annotations;
using Leadtools.Demos;
using Leadtools.Help;

private void AnnAutomationManager_ContextMenu(AnnAutomationManager manager)
{
   ContextMenu cm = manager.ContextMenu;
   // add a separator
   cm.Items.Add(new Separator());
   // add a test menu item
   MenuItem mi = new MenuItem();
   mi.Header = "Test";
   mi.Click += new RoutedEventHandler(MyTestMenuItemHandler);
   cm.Items.Add(mi);
}
private void MyTestMenuItemHandler(object sender, RoutedEventArgs e)
{
   MessageBox.Show("Test clicked");
}
Requirements

Target Platforms

See Also

Reference

AnnAutomationManager Class
AnnAutomationManager Members

Error processing SSI file
   Leadtools.Windows.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features