Table of Contents

Class NotifyCommandBase

Namespace
H.Extensions.Command
Assembly
H.Extensions.Command.dll
public abstract class NotifyCommandBase : BindableBase, INotifyPropertyChanged, ICommand
Inheritance
NotifyCommandBase
Implements
Derived
Inherited Members
Extension Methods

Constructors

NotifyCommandBase(Action<object>)

public NotifyCommandBase(Action<object> action)

Parameters

action Action<object>

NotifyCommandBase(Action<object>, Predicate<object>)

public NotifyCommandBase(Action<object> execute, Predicate<object> canExecute)

Parameters

execute Action<object>
canExecute Predicate<object>

Fields

_action

protected Action<object> _action

Field Value

Action<object>

_canExecute

protected readonly Predicate<object> _canExecute

Field Value

Predicate<object>

Methods

CanExecute(object)

Defines the method that determines whether the command can execute in its current state.

public virtual bool CanExecute(object parameter)

Parameters

parameter object

Data used by the command. If the command does not require data to be passed, this object can be set to null.

Returns

bool

true if this command can be executed; otherwise, false.

Execute(object)

Defines the method to be called when the command is invoked.

public virtual void Execute(object parameter)

Parameters

parameter object

Data used by the command. If the command does not require data to be passed, this object can be set to null.

Refresh()

public void Refresh()

Events

CanExecuteChanged

Occurs when changes occur that affect whether or not the command should execute.

public event EventHandler CanExecuteChanged

Event Type

EventHandler