RelayCommand<T> Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A generic command whose sole purpose is to relay its functionality to other
objects by invoking delegates. The default return value for the CanExecute
method is true
. This class allows you to accept command parameters
in the Execute(T) and CanExecute(T) callback methods.
public sealed class RelayCommand<T> : Microsoft.Toolkit.Mvvm.Input.IRelayCommand<T>, System.Windows.Input.ICommand
type RelayCommand<'T> = class
interface IRelayCommand<'T>
interface IRelayCommand
interface ICommand
Public NotInheritable Class RelayCommand(Of T)
Implements ICommand, IRelayCommand(Of T)
- T
The type of parameter being passed as input to the callbacks.
- Inheritance
-
RelayCommand<T>
- Implements
Relay |
Initializes a new instance of the RelayCommand<T> class. |
Relay |
Initializes a new instance of the RelayCommand<T> class that can always execute. |
Can |
|
Can |
|
Execute(Object) | |
Execute(T) | |
Notify |
Notifies that the CanExecute(Object) property has changed. |