public static void ViewOverweightReport(string htmlReport, string reportName) { CommandEnvironment.OpenHtmlReport(htmlReport, reportName, delegate(string command, TextWriter log, WebBrowserWindow window) { // We are not on the GUI thread, so any time we interact with the GUI thread we must dispatch to it. window.Dispatcher.BeginInvoke((Action) delegate { // If you have any active hyperlinks, they come here. ProcessHyperlinkCommand(command); // If you want to invoke other GUI Actions do them here. }); }); }