public static void ShowDialog(IWin32Window owner, Exception ex) { Trace.TraceError(ex.Message); using (var dlg = new ErrorDialog()) { dlg.ErrorLabel.Text = ex.Message; dlg.ShowDialog(owner); } }