How can I ensure closed dialogs are unregistered from INPC events?
问题 I have an MVVM-Light based WPF application, with a dialog service (called WindowManager ) that opens up dialog windows bound to pre-initiated dialog view-models, like this: private enum ViewModelKind { PlanningGridVM, InputDialogVM, TreeViewDialogVM, SaveFileDialogVM, MessageBoxVM } /// <summary> /// Shows the Window linked to this ViewModel as a dialog window. /// </summary> /// <typeparam name="TViewModel">The type of the view model.</typeparam> /// <returns>Tri-state boolean dialog