bovender framework
C# framework that implements MVVM and more
Bovender.Mvvm.Actions.NotificationAction Class Reference

Opens a generic WPF dialog window that displays a message and has a single OK button. More...

Inheritance diagram for Bovender.Mvvm.Actions.NotificationAction:
Bovender.Mvvm.Actions.MessageActionBase 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

Public Member Functions

 NotificationAction (string caption, string message)
 
 NotificationAction (string caption, string message, string okButtonText)
 
 NotificationAction (string caption, string message, string okButtonText, string param)
 
 NotificationAction (string caption, string message, string okButtonText, string param1, string param2)
 
 NotificationAction (string caption, string message, string okButtonText, string param1, string param2, string param3)
 

Static Public Attributes

static readonly DependencyProperty CaptionProperty
 
static readonly DependencyProperty MessageProperty
 
static readonly DependencyProperty Param1Property
 
static readonly DependencyProperty Param2Property
 
static readonly DependencyProperty Param3Property
 
static readonly DependencyProperty OkButtonTextProperty
 
static readonly DependencyProperty CancelButtonTextProperty
 

Protected Member Functions

override Window CreateView ()
 Returns a view that can bind to expected message contents. More...
 
override ViewModels.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...
 
- Protected Member Functions inherited from Bovender.Mvvm.Actions.MessageActionBase
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...
 

Properties

string Caption [get, set]
 
string Message [get, set]
 
string Param1 [get, set]
 
string Param2 [get, set]
 
string Param3 [get, set]
 
string OkButtonText [get, set]
 
string CancelButtonText [get, set]
 
string FormattedText [get]
 Returns the Message string formatted with the three params. More...
 
- Properties inherited from Bovender.Mvvm.Actions.MessageActionBase
MessageContent Content [get, set]
 

Detailed Description

Opens a generic WPF dialog window that displays a message and has a single OK button.

The message string can include parameters.

The string properties must be declared as dependency properties so that they can be data-bound in XAML.

Definition at line 33 of file NotificationAction.cs.

Member Function Documentation

override Window Bovender.Mvvm.Actions.NotificationAction.CreateView ( )
inlineprotectedvirtual

Returns a view that can bind to expected message contents.

Returns
Descendant of Window.

Implements Bovender.Mvvm.Actions.MessageActionBase.

Reimplemented in Bovender.Mvvm.Actions.ProcessCompletedAction, Bovender.Mvvm.Actions.SuppressibleNotificationAction, Bovender.Mvvm.Actions.ProcessAction, and Bovender.Mvvm.Actions.ShowViewAction.

Definition at line 195 of file NotificationAction.cs.

override ViewModels.ViewModelBase Bovender.Mvvm.Actions.NotificationAction.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 from Bovender.Mvvm.Actions.MessageActionBase.

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

Definition at line 204 of file NotificationAction.cs.

Member Data Documentation

readonly DependencyProperty Bovender.Mvvm.Actions.NotificationAction.CancelButtonTextProperty
static
Initial value:
= DependencyProperty.Register(
"CancelButtonText", typeof(string), typeof(NotificationAction))

Definition at line 147 of file NotificationAction.cs.

readonly DependencyProperty Bovender.Mvvm.Actions.NotificationAction.CaptionProperty
static
Initial value:
= DependencyProperty.Register(
"Caption", typeof(string), typeof(NotificationAction))

Definition at line 129 of file NotificationAction.cs.

readonly DependencyProperty Bovender.Mvvm.Actions.NotificationAction.MessageProperty
static
Initial value:
= DependencyProperty.Register(
"Message", typeof(string), typeof(NotificationAction))

Definition at line 132 of file NotificationAction.cs.

readonly DependencyProperty Bovender.Mvvm.Actions.NotificationAction.OkButtonTextProperty
static
Initial value:
= DependencyProperty.Register(
"OkButtonText", typeof(string), typeof(NotificationAction))

Definition at line 144 of file NotificationAction.cs.

readonly DependencyProperty Bovender.Mvvm.Actions.NotificationAction.Param1Property
static
Initial value:
= DependencyProperty.Register(
"Param1", typeof(string), typeof(NotificationAction))

Definition at line 135 of file NotificationAction.cs.

readonly DependencyProperty Bovender.Mvvm.Actions.NotificationAction.Param2Property
static
Initial value:
= DependencyProperty.Register(
"Param2", typeof(string), typeof(NotificationAction))

Definition at line 138 of file NotificationAction.cs.

readonly DependencyProperty Bovender.Mvvm.Actions.NotificationAction.Param3Property
static
Initial value:
= DependencyProperty.Register(
"Param3", typeof(string), typeof(NotificationAction))

Definition at line 141 of file NotificationAction.cs.

Property Documentation

string Bovender.Mvvm.Actions.NotificationAction.FormattedText
get

Returns the Message string formatted with the three params.

Definition at line 105 of file NotificationAction.cs.


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