Click or drag to resize

RelayCommand Class

Implements an ICommand by storing and executing actions for Execute(Object) and CanExecute(Object). Note that you have to manually call OnCanExecuteChanged if CanExecute(Object) will return a different value than before.
Inheritance Hierarchy
SystemObject
  Altaxo.GuiRelayCommand

Namespace: Altaxo.Gui
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public class RelayCommand : ICommand

The RelayCommand type exposes the following members.

Constructors
 NameDescription
Public methodRelayCommand(Action)Initializes a new instance of the RelayCommand class
Public methodRelayCommand(Action, FuncBoolean)Initializes a new instance of the RelayCommand class
Top
Methods
 NameDescription
Public methodCanExecute Defines the method that determines whether the command can execute in its current state.
Public methodEhRequerySuggested Used to connect to the Wpf CommandManager's RequerySuggested event that is fired if something in the Gui has changed.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodExecute Defines the method to be called when the command is invoked.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodOnCanExecuteChanged If called, will raise the CanExecuteChanged event. Call this function manually if CanExecute(Object) will return a different value than before.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Events
 NameDescription
Public eventCanExecuteChanged Occurs when changes occur that affect whether or not the command should execute.
Top
See Also