Class RelayCommand
A command whose sole purpose is to relay its functionality to other objects by invoking delegates.
Inheritance
System.Object
RelayCommand
Implements
System.Windows.Input.ICommand
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: TcOpen.Inxton.Input
Assembly: TcOpen.Inxton.Abstractions.dll
Syntax
public class RelayCommand : ICommand
Constructors
| Improve this Doc View SourceRelayCommand(Action<Object>, Func<Object, Boolean>, Action)
Declaration
public RelayCommand(Action<object> execute, Func<object, bool> canExecute = null, Action logAction = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<System.Object> | execute | |
| System.Func<System.Object, System.Boolean> | canExecute | |
| System.Action | logAction |
Fields
| Improve this Doc View Source_canExecute
Declaration
readonly Func<object, bool> _canExecute
Field Value
| Type | Description |
|---|---|
| System.Func<System.Object, System.Boolean> |
_execute
Declaration
readonly Action<object> _execute
Field Value
| Type | Description |
|---|---|
| System.Action<System.Object> |
_logAction
Declaration
readonly Action _logAction
Field Value
| Type | Description |
|---|---|
| System.Action |
Methods
| Improve this Doc View SourceCanExecute(Object)
Declaration
public bool CanExecute(object parameter)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | parameter |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Execute(Object)
Declaration
public void Execute(object parameter = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | parameter |
RaiseCanExecuteChanged()
RaiseCanExecuteChanged method should be called when using .net 5.0 or greater.
Declaration
public void RaiseCanExecuteChanged()
ValidateCanExecute(IValueTag, ValueChangedEventArgs)
Declaration
public void ValidateCanExecute(IValueTag sender, ValueChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| Vortex.Connector.IValueTag | sender | |
| Vortex.Connector.ValueTypes.ValueChangedEventArgs | args |
Events
| Improve this Doc View SourceCanExecuteChanged
Declaration
public event EventHandler CanExecuteChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler |
Implements
System.Windows.Input.ICommand