Abstract base class for MVVM messaging actions. More...
Protected Member Functions | |
| override void | Invoke (object parameter) |
| Invokes the action by creating a view and a corresponding view model. More... | |
| void | Invoke< T > (T messageContent, Action response) |
| virtual void | ShowView (Window view) |
| Shows the view as a modal dialog. More... | |
| virtual ViewModelBase | GetDataContext (MessageContent messageContent) |
| Gets a ViewModelBase object that will be injected into the view In the abstract base class, this returns the messageContent parameter as-is. More... | |
| abstract Window | CreateView () |
| Returns a view that can bind to expected message contents. More... | |
Properties | |
| MessageContent | Content [get, set] |
Abstract base class for MVVM messaging actions.
Derived classes must implement a CreateView method that returns a view for the view model that is expected to be received as a message content.
Definition at line 32 of file MessageActionBase.cs.
|
protectedpure virtual |
Returns a view that can bind to expected message contents.
Implemented in Bovender.Mvvm.Actions.NotificationAction, Bovender.Mvvm.Actions.ProcessCompletedAction, Bovender.Mvvm.Actions.FileFolderActionBase, Bovender.Mvvm.Actions.SuppressibleNotificationAction, Bovender.Mvvm.Actions.ConfirmationAction, Bovender.Mvvm.Actions.ProcessAction, and Bovender.Mvvm.Actions.ShowViewAction.
|
inlineprotectedvirtual |
Gets a ViewModelBase object that will be injected into the view In the abstract base class, this returns the messageContent parameter as-is.
| messageContent | Message content that will be data-bound to the view. |
Reimplemented in Bovender.Mvvm.Actions.NotificationAction, Bovender.Mvvm.Actions.ShowViewAction, and Bovender.Mvvm.Actions.ProcessAction.
Definition at line 137 of file MessageActionBase.cs.
|
inlineprotected |
Invokes the action by creating a view and a corresponding view model.
| parameter | MessageArgs argument for the Message.Sent event. |
Definition at line 47 of file MessageActionBase.cs.
|
inlineprotectedvirtual |
Shows the view as a modal dialog.
Override this to do something else with the view.
| view | Window object previously created by CreateView. |
This method is called internally by the Invoke method.
Reimplemented in Bovender.Mvvm.Actions.ShowViewAction, and Bovender.Mvvm.Actions.ShowViewDialogAction.
Definition at line 123 of file MessageActionBase.cs.