RelayCommand Class
Definition
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 command whose sole purpose is to relay its functionality to other
objects by invoking delegates. The default return value for the CanExecute(Object)
method is true
. This type does not allow you to accept command parameters
in the Execute(Object) and CanExecute(Object) callback methods.
public sealed class RelayCommand : CommunityToolkit.Mvvm.Input.IRelayCommand, System.Windows.Input.ICommand
type RelayCommand = class
interface IRelayCommand
interface ICommand
Public NotInheritable Class RelayCommand
Implements ICommand, IRelayCommand
- Inheritance
-
RelayCommand
- Implements
Constructors
RelayCommand(Action, Func<Boolean>) |
Initializes a new instance of the RelayCommand class. |
RelayCommand(Action) |
Initializes a new instance of the RelayCommand class that can always execute. |
Methods
CanExecute(Object) | |
Execute(Object) | |
NotifyCanExecuteChanged() |
Notifies that the CanExecute(Object) property has changed. |
Events
CanExecuteChanged |