Table of Contents

Struct CommandSourceStruct

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Helper structure that contains command and parameter. It can be used as a field in classes that need Command and CommandParameter properties in order to reuse the common functionality.

public struct CommandSourceStruct : ICommandSource
Implements

Constructors

CommandSourceStruct(object)

Initializes a new instance of the CommandSourceStruct struct.

Fields

CanExecuteCommandSourceOverride

Optional override for checking if a command source can execute. If set, this delegate will be called instead of the default logic in CanExecuteCommandSource(ICommandSource).

Changed

Occurs when Command is changed or CanExecute(object?) is changed.

ExecuteCommandSourceOverride

Optional override for executing a command source. If set, this delegate will be called instead of the default execution logic in ExecuteCommandSource(ICommandSource).

Properties

CanExecute

Gets whether command can be executed.

Command

Gets the parameter that will be passed to the command when executing it.

CommandParameter

Gets the parameter that will be passed to the command when executing it.

CommandTarget

Get or sets target object where the command should be raised.

Methods

CanExecuteCommandSource(ICommandSource)

Gets whether commandSource can be executed.

Execute()

Executes command if it is specified.

ExecuteCommandSource(ICommandSource)

Executes command specified with ICommandSource