By Muhammad Shujaat Siddiqi
Since we need our view model logic to be able to initiate the display of these dialogs, we might be tempted to call these methods directly from our view models. The problem with calling
ShowDialog() directly is that it requires the
System.Windows.Window references to be held by view model coupling
System.Windows. This breaks down the desired separation of concerns in MVVM and makes things like testing our code more difficult than it needs to be.
There is another issue around dialog ownership as you must set a dialog's owner to be the window that will be its parent. Even if we show our dialogs directly from our view models, we still will not be able...