| ISwAddInExAddContextMenuTCmdEnum Method |
Add context menu based on the defined commands enumerator
Namespace:
CodeStack.SwEx.AddIn.Base
Assembly:
CodeStack.SwEx.AddIn (in CodeStack.SwEx.AddIn.dll) Version: 0.8.1.0 (0.8.1.0)
Syntax CommandGroup AddContextMenu<TCmdEnum>(
Action<TCmdEnum> callback,
swSelectType_e contextMenuSelectType = swSelectType_e.swSelEVERYTHING,
EnableMethodDelegate<TCmdEnum> enable = null
)
where TCmdEnum : IComparable, IFormattable, IConvertible
Function AddContextMenu(Of TCmdEnum As {IComparable, IFormattable, IConvertible}) (
callback As Action(Of TCmdEnum),
Optional contextMenuSelectType As swSelectType_e = swSelectType_e.swSelEVERYTHING,
Optional enable As EnableMethodDelegate(Of TCmdEnum) = Nothing
) As CommandGroup
generic<typename TCmdEnum>
where TCmdEnum : IComparable, IFormattable, IConvertible
CommandGroup^ AddContextMenu(
Action<TCmdEnum>^ callback,
swSelectType_e contextMenuSelectType = swSelectType_e::swSelEVERYTHING,
EnableMethodDelegate<TCmdEnum>^ enable = nullptr
)
Parameters
- callback
- Type: SystemActionTCmdEnum
Callback function for the commands - contextMenuSelectType (Optional)
- Type: swSelectType_e
Selection type where the menu is enabled as defined in swSelectType_e - enable (Optional)
- Type: CodeStack.SwEx.AddIn.DelegatesEnableMethodDelegateTCmdEnum
Optional enable method for the commands.
If this method is not used than command will be enabled according to the workspace
defined in the SupportedWorkspaces for this command
Type Parameters
- TCmdEnum
- Enumerator with commands
Return Value
Type:
CommandGroupNewly created
CommandGroupRemarks It is only possible to specify single selection group for the context menu.
If it is required to enable the menu for multiple selection elements
use swSelEVERYTHING option and enable parameter
to specify the enable function
See Also