private static void ShowViewerConfig(ViewerConfigMessage message) { ViewerConfigWindow window = new ViewerConfigWindow { DataContext = message.ViewerConfigVM }; message.ViewerConfigVM.RequestClose += (sender, e) => { window.Close(); }; window.ShowDialog(); message.Process(); }
private static void ShowViewerConfig(ViewerConfigMessage message) { try { ViewerConfigWindow window = new ViewerConfigWindow { DataContext = message.ViewerConfigVM, Owner = Application.Current.MainWindow, }; message.ViewerConfigVM.RequestClose += (sender, e) => { window.Close(); }; window.ShowDialog(); message.Process(); } catch (Exception ex) { ExceptionUtils.HandleException(ex); } }