private static async Task ShowInformationDialogAsync(InformationMessage message) { if (message is ExceptionMessage) { Trace.TraceError($"Exception: { message.VM.Details }"); } var window = new InformationWindow() { VM = message.VM }; await window.ShowDialog(MainWindow); message.Process(); }
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); } }