In This Article

PreviewableDelegateCommand<T> Class

Provides an IPreviewableCommand implementation based on delegates.

public class PreviewableDelegateCommand<T> : DelegateCommand<T>, IPreviewableCommand, ICommand
Type Parameters:
T -

The parameter type.

Inheritance:
System.Object DelegateCommand<T> Object
Implements:
IPreviewableCommand

Constructors

PreviewableDelegateCommand(Action<T>, Func<T, Boolean>, Action<T>, Action<T>)

Initializes an instance of the PreviewableDelegateCommand class.

public PreviewableDelegateCommand(Action<T> executeAction, Func<T, bool> canExecuteFunc, Action<T> previewAction, Action<T> cancelPreviewAction)
Parameter Type Description
executeAction System.Action<T>

The execute action.

canExecuteFunc System.Func<T, System.Boolean>

The can-execute function.

previewAction System.Action<T>

The preview action.

cancelPreviewAction System.Action<T>

The cancel preview action.

Methods

CancelPreview(T)

Requests to cancel a command preview.

public void CancelPreview(T parameter)
Parameter Type Description
parameter T

The command parameter.

Preview(T)

Requests that the command should be previewed.

public void Preview(T parameter)
Parameter Type Description
parameter T

The command parameter.

Explicit Interface Implementations

IPreviewableCommand.CancelPreview(Object)

Requests to cancel a command preview.

void IPreviewableCommand.CancelPreview(object parameter)
Parameter Type Description
parameter System.Object

The command parameter.

IPreviewableCommand.Preview(Object)

Requests that the command should be previewed.

void IPreviewableCommand.Preview(object parameter)
Parameter Type Description
parameter System.Object

The command parameter.

Inherited Members