Occurs when the right mouse button is pressed when this tool is the active tool.

Namespace:  ESRI.ArcGIS.Desktop.AddIns

Assembly:  ESRI.ArcGIS.Desktop.Addins (in ESRI.ArcGIS.Desktop.Addins.dll) Version: 10.0.0.0 (10.0.0.0)

Syntax

C#
protected virtual bool OnContextMenu(
	int x,
	int y
)
Visual Basic (Declaration)
Protected Overridable Function OnContextMenu ( _
	x As Integer, _
	y As Integer _
) As Boolean
Visual C++
protected:
virtual bool OnContextMenu(
	int x, 
	int y
)

Parameters

x
Type: System..::.Int32

The x.
y
Type: System..::.Int32

The y.

Return Value

Remarks

When creating a custom tool, write code to display a custom context menu when the right mouse button is pressed when this tool is the active tool in the OnContextMenu method. If your tool displays a custom context menu, it should let the application know that it handled the OnContextMenu event by returning True from the OnContextMenu function. If you don't do this, the standard context menu will be displayed after your custom context menu.

See Also