Click or drag to resize

NullCommand Class

A ICommand implementation that does nothing and can't be executed.
Inheritance Hierarchy
SystemObject
  TomsToolbox.WpfNullCommand

Namespace:  TomsToolbox.Wpf
Assembly:  TomsToolbox.Wpf (in TomsToolbox.Wpf.dll)
Syntax
public class NullCommand : ICommand

The NullCommand type exposes the following members.

Constructors
  NameDescription
Public methodNullCommand
Initializes a new instance of the NullCommand class
Top
Methods
  NameDescription
Public methodCanExecute
Defines the method that determines whether the command can execute in its current state.
Public methodExecute
Defines the method to be called when the command is invoked.
Top
Events
  NameDescription
Public eventCanExecuteChanged
Occurs when changes occur that affect whether or not the command should execute.
Top
Fields
  NameDescription
Public fieldStatic memberDefault
The singleton instance of the command.
Top
Extension Methods
Remarks
Useful as fallback for command bindings, since a binding to null will leave the bound control enabled.
See Also