Leadtools.Windows.Annotations Namespace > AnnAutomationManager Class : ContextMenu Property |
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 ContextMenu ContextMenu {get; set;}
get_ContextMenu();
set_ContextMenu(value);
public: property ContextMenu^ ContextMenu { ContextMenu^ get(); void set ( ContextMenu^ value); }
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
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"); }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2