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
3,566 times
Add to favorites
E-mail Twitter Digg Facebook

Solution explorer

' Michel Posseth 
Imports System.Windows.Input
Public Class RelayCommand
    Inherits ObservableObject
    Implements ICommand
    ReadOnly _Execute As Action(Of Object)
    ReadOnly _CanExecute As Predicate(Of Object)
    Public Sub New(ByVal execute As Action(Of Object), ByVal canExecute As Predicate(Of Object))
        If execute Is Nothing Then
            Throw New ArgumentNullException("execute", "execute is null.")
        End If
        _Execute = execute
        _CanExecute = canExecute
    End Sub
    Public Sub New(ByVal execute As Action(Of Object))
        Me.New(execute, Nothing)
    End Sub
    Public Function CanExecute(ByVal parameter As Object) As Boolean Implements System.Windows.Input.ICommand.CanExecute
        Return If(_CanExecute Is Nothing, True, _CanExecute(parameter))
    End Function
    Public Sub Execute(ByVal parameter As Object) Implements System.Windows.Input.ICommand.Execute
        If CanExecute(parameter) Then
        End If
    End Sub
    Public Event CanExecuteChanged(ByVal sender As Object, ByVal e As System.EventArgs) Implements System.Windows.Input.ICommand.CanExecuteChanged
    Public Sub RaiseCanExecuteChanged()
        RaiseEvent CanExecuteChanged(Me, Nothing)
    End Sub
End Class