bovender framework
C# framework that implements MVVM and more
Bovender.Mvvm.Actions.MessageActionBase Class Referenceabstract

Abstract base class for MVVM messaging actions. More...

Inheritance diagram for Bovender.Mvvm.Actions.MessageActionBase:
Bovender.Mvvm.Actions.NotificationAction Bovender.Mvvm.Actions.ConfirmationAction Bovender.Mvvm.Actions.FileFolderActionBase Bovender.Mvvm.Actions.ProcessCompletedAction Bovender.Mvvm.Actions.ShowViewAction Bovender.Mvvm.Actions.SuppressibleNotificationAction Bovender.Mvvm.Actions.ChooseFolderAction Bovender.Mvvm.Actions.FileDialogActionBase Bovender.Mvvm.Actions.ProcessAction Bovender.Mvvm.Actions.ShowViewDialogAction Bovender.Mvvm.Actions.ChooseFileOpenAction Bovender.Mvvm.Actions.ChooseFileSaveAction

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]
 

Detailed Description

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.

Member Function Documentation

abstract Window Bovender.Mvvm.Actions.MessageActionBase.CreateView ( )
protectedpure virtual
virtual ViewModelBase Bovender.Mvvm.Actions.MessageActionBase.GetDataContext ( MessageContent  messageContent)
inlineprotectedvirtual

Gets a ViewModelBase object that will be injected into the view In the abstract base class, this returns the messageContent parameter as-is.

Parameters
messageContentMessage content that will be data-bound to the view.
Returns
ViewModelBase object

Reimplemented in Bovender.Mvvm.Actions.NotificationAction, Bovender.Mvvm.Actions.ShowViewAction, and Bovender.Mvvm.Actions.ProcessAction.

Definition at line 137 of file MessageActionBase.cs.

override void Bovender.Mvvm.Actions.MessageActionBase.Invoke ( object  parameter)
inlineprotected

Invokes the action by creating a view and a corresponding view model.

Parameters
parameterMessageArgs argument for the Message.Sent event.

Definition at line 47 of file MessageActionBase.cs.

virtual void Bovender.Mvvm.Actions.MessageActionBase.ShowView ( Window  view)
inlineprotectedvirtual

Shows the view as a modal dialog.

Override this to do something else with the view.

Parameters
viewWindow 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.


The documentation for this class was generated from the following file: