In This Article

PreviewableDelegateCommand<T> Class

Provides an IPreviewableCommand implementation based on delegates.

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

The parameter type.

Inheritance:
object DelegateCommand<T> object
Implements:
IPreviewableCommand

Constructors

PreviewableDelegateCommand(Action<T>, Func<T, bool>, 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 Action<T>

The execute action.

canExecuteFunc Func<T, bool>

The can-execute function.

previewAction Action<T>

The preview action.

cancelPreviewAction 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.

Inherited Members