New to Telerik UI for WinForms? Start a free 30-day trial

Activates a menu item by selecting it if needed and requesting that its child items be shown.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class ActivateMenuItemCommand : CommandBase, IImageListProvider

Inheritance: objectCommandBaseActivateMenuItemCommand

Implements: IImageListProvider

Constructors

C#
public ActivateMenuItemCommand()

Methods

Checks whether the parameter is a RadMenuItem or a derived type.

C#
public override bool CanExecute(object parameter)
Parameters:parameterobject

A non-null object to test.

Returns:

bool

true when the parameter is a menu item; otherwise, false.

Overrides: CommandBase.CanExecute(object)

Activates the menu item in the first setting and forwards the settings to the base command notifications.

C#
public override object Execute(params object[] settings)
Parameters:settingsobject[]

If supplied, the first value must be a non-null RadMenuItem; additional values are forwarded to command event handlers.

Returns:

object

The base command result after activation, or null when no setting or no menu-item setting is supplied.

Overrides: CommandBase.Execute(params object[])