Gets or sets the javascript function to invoke when users right click on valid objects to display its context menu.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Property OnContextMenu As String |
| C# | |
|---|
public string OnContextMenu {get; set;} |
Remarks
Example
The following codes demonstrate how to extend the window's system context menu by adding a new About menu item.
| C# | Copy Code |
|---|
function DesktopManager_OnContextMenu(controlId, objectType, contextObject, menu)
{
if (objectType == "Window")
{
if (menu.Items.GetNamedItem("mnuAbout") == null)
menu.Items.Add( new WebMenuItem("mnuAbout", "About...") );
}
} |
Requirements
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
See Also