In This Article

WindowsShellMenuItemCommand Class

Represents an ICommand to be used on a menu item for one or more Windows shell objects.

public class WindowsShellMenuItemCommand
Inheritance:
object object

Remarks

The command parameter is of type UInt32, which passes the related Windows shell context menu command ID.

Properties

TargetViewModels

Gets the collection of target ShellObjectViewModel objects that are affected by the command.

public IList<ShellObjectViewModel> TargetViewModels { get; }

Property Value

IList<ShellObjectViewModel>:

The collection of target ShellObjectViewModel objects that are affected by the command.

Verb

Gets the string verb related to the command, if known.

public string Verb { get; }

Property Value

string:

The string verb related to the command, if known.

Methods

CanExecute(object)

Returns whether the command can execute.

public bool CanExecute(object parameter)
Parameter Type Description
parameter object

The parameter to examine.

Returns

bool:

true if the command can execute; otherwise, false.

Execute(object)

Executes the command.

public void Execute(object parameter)
Parameter Type Description
parameter object

The parameter to examine.

RaiseCanExecuteChanged()

Raises the CanExecuteChanged event.

public void RaiseCanExecuteChanged()

Events

CanExecuteChanged

Occurs after the can-execute state has changed.

public event EventHandler CanExecuteChanged

Event Type

EventHandler

Inherited Members