Share via


Command<T> Class

Definition

A generic implementation of ICommand with strongly-typed parameter.

generic <typename T>
public ref class Command sealed : Microsoft::Maui::Controls::Command
public sealed class Command<T> : Microsoft.Maui.Controls.Command
type Command<'T> = class
    inherit Command
Public NotInheritable Class Command(Of T)
Inherits Command

Type Parameters

T

The type of the command parameter.

Inheritance
Command<T>

Constructors

Name Description
Command<T>(Action<T>, Func<T,Boolean>)

Creates a new command with the specified execute and canExecute delegates.

Command<T>(Action<T>)

Creates a new command with the specified execute action.

Methods

Name Description
CanExecute(Object)

Returns a Boolean indicating if the Command can be exectued with the given parameter.

(Inherited from Command)
ChangeCanExecute()

Send a CanExecuteChanged

(Inherited from Command)
Execute(Object)

Invokes the execute Action

(Inherited from Command)

Events

Name Description
CanExecuteChanged (Inherited from Command)

Applies to