private static void ShowInformation(InformationMessage message) { InformationWindow window = new InformationWindow { DataContext = message.InformationVM }; message.InformationVM.RequestClose += (sender, e) => { window.Close(); }; window.Closed += (sender, args) => { message.Process(); }; window.Show(); }
private static void ShowInformation(InformationMessage message) { try { InformationWindow window = new InformationWindow { DataContext = message.InformationVM, Owner = Application.Current.MainWindow, }; message.InformationVM.RequestClose += (sender, e) => { window.Close(); }; window.Closed += (sender, args) => { message.Process(); }; window.Show(); } catch (Exception ex) { ExceptionUtils.HandleException(ex); } }