Simple way of showing Msgbox and Dialogs in WPF MVVM

I know that MVVM purists say that you should not use messageboxes and Dialogs in a MVVM application , however as a business developer you must sometimes blok the GUI to let the user pick an item or confirm there actions . After some discussions in the comunity i decided to show y

 
 
 
 
 
4 Star
(1)
3,564 times
Add to favorites
3/26/2011
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

VB.NET
<?xml version="1.0"?>
<doc>
<assembly>
<name>
SimpleMVVMDialogAndMsgBoxExample
</name>
</assembly>
<members>
<member name="M:XamlGeneratedNamespace.GeneratedInternalTypeHelper.CreateInstance(System.Type,System.Globalization.CultureInfo)">
	<summary>
CreateInstance
</summary>
</member><member name="M:XamlGeneratedNamespace.GeneratedInternalTypeHelper.GetPropertyValue(System.Reflection.PropertyInfo,System.Object,System.Globalization.CultureInfo)">
	<summary>
GetPropertyValue
</summary>
</member><member name="M:XamlGeneratedNamespace.GeneratedInternalTypeHelper.SetPropertyValue(System.Reflection.PropertyInfo,System.Object,System.Object,System.Globalization.CultureInfo)">
	<summary>
SetPropertyValue
</summary>
</member><member name="M:XamlGeneratedNamespace.GeneratedInternalTypeHelper.CreateDelegate(System.Type,System.Object,System.String)">
	<summary>
CreateDelegate
</summary>
</member><member name="M:XamlGeneratedNamespace.GeneratedInternalTypeHelper.AddEventHandler(System.Reflection.EventInfo,System.Object,System.Delegate)">
	<summary>
AddEventHandler
</summary>
</member><member name="T:XamlGeneratedNamespace.GeneratedInternalTypeHelper">
	<summary>
GeneratedInternalTypeHelper
</summary>
</member><member name="M:VBDC.View.TabView.InitializeComponent">
	<summary>
InitializeComponent
</summary>
</member><member name="T:VBDC.View.TabView">
	<summary>
TabView
</summary>
</member><member name="M:VBDC.App.Main">
	<summary>
Application Entry Point.
</summary>
</member><member name="T:VBDC.App">
	<summary>
App
</summary>
</member><member name="M:MainWindow.InitializeComponent">
	<summary>
InitializeComponent
</summary>
</member><member name="T:MainWindow">
	<summary>
MainWindow
</summary>
</member><member name="M:VBDC.ViewModel.MainWindowViewModel.MsgboxConfirmation(System.String,System.String,System.Windows.MessageBoxButton,System.Windows.MessageBoxImage,System.Windows.Window,System.Object)">
	<summary>
 This is the one method that invokes the messagebox for all viewmodels 
 </summary>
	<param name="Txt"></param>
	<param name="Caption"></param>
	<param name="ButtonStyle"></param>
	<param name="ImageStyle"></param>
	<param name="myWindow"></param>
	<param name="sender"></param>
	<remarks></remarks>
</member><member name="M:VBDC.ViewModel.ViewModelBase.Dispose">
	<summary>
 Invoked when this object is being removed from the application
 and will be subject to garbage collection.
 </summary>
</member><member name="M:VBDC.ViewModel.ViewModelBase.OnDispose">
	<summary>
 Child classes can override this method to perform 
 clean-up logic, such as removing event handlers.
 </summary>
</member><member name="M:VBDC.ViewModel.ViewModelBase.Finalize">
	<summary>
 Useful for ensuring that ViewModel objects are properly garbage collected.
 </summary>
</member><member name="T:VBDC.ViewModel.ViewModelBase">
	<summary>
 Base class for all ViewModel classes in the application.
 It provides support for property change notifications 
 and has a DisplayName property.  This class is abstract.
 </summary>
</member><member name="P:My.MyWpfExtension.Application">
	<summary>
 Returns the application object for the running application
 </summary>
</member><member name="P:My.MyWpfExtension.Computer">
	<summary>
 Returns information about the host computer.
 </summary>
</member><member name="P:My.MyWpfExtension.User">
	<summary>
 Returns information for the current user.  If you wish to run the application with the current 
 Windows user credentials, call My.User.InitializeWithWindowsUser().
 </summary>
</member><member name="P:My.MyWpfExtension.Log">
	<summary>
 Returns the application log. The listeners can be configured by the application's configuration file.
 </summary>
</member><member name="P:My.MyWpfExtension.Windows">
	<summary>
 Returns the collection of Windows defined in the project.
 </summary>
</member><member name="T:My.MyWpfExtension">
	<summary>
 Module used to define the properties that are available in the My Namespace for WPF
 </summary>
	<remarks></remarks>
</member><member name="P:My.Resources.Resources.ResourceManager">
	<summary>
  Returns the cached ResourceManager instance used by this class.
</summary>
</member><member name="P:My.Resources.Resources.Culture">
	<summary>
  Overrides the current thread's CurrentUICulture property for all
  resource lookups using this strongly typed resource class.
</summary>
</member><member name="T:My.Resources.Resources">
	<summary>
  A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member>
</members>
</doc>