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:
- 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 | Action<T> | The execute action. |
canExecuteFunc | Func<T, Boolean> | 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. |
Explicit Interface Implementations
IPreviewableCommand.CancelPreview(Object)
Requests to cancel a command preview.
void IPreviewableCommand.CancelPreview(object parameter)
Parameter | Type | Description |
---|---|---|
parameter | Object | The command parameter. |
IPreviewableCommand.Preview(Object)
Requests that the command should be previewed.
void IPreviewableCommand.Preview(object parameter)
Parameter | Type | Description |
---|---|---|
parameter | Object | The command parameter. |
Inherited Members
- DelegateCommand<T>.CanExecute(T)
- DelegateCommand<T>.Execute(T)
- DelegateCommand<T>.RaiseCanExecuteChanged()
- DelegateCommand<T>.CanExecuteChanged
- Object.ToString()
- Object.Equals(Object)
- Object.Equals(Object, Object)
- Object.ReferenceEquals(Object, Object)
- Object.GetHashCode()
- Object.GetType()
- Object.MemberwiseClone()