protected override void Invoke(object parameter) { // From: http://sushantp.wordpress.com/2009/11/25/silverlight-reporting-support-for-ssrs-reports-problem-and-possible-solutions/ if (true == HtmlPage.IsPopupWindowAllowed) { System.Text.StringBuilder codeToRun = new System.Text.StringBuilder(); codeToRun.Append("window.open("); codeToRun.Append("\""); codeToRun.Append(string.Format("{0}", PopupURL)); codeToRun.Append("\","); codeToRun.Append("\""); codeToRun.Append("\","); codeToRun.Append("\""); codeToRun.Append("width=" + PopupWidth.ToString() + ",height=" + PopupHeight.ToString()); codeToRun.Append(",scrollbars=yes,menubar=no,toolbar=no,resizable=yes"); codeToRun.Append("\");"); try { HtmlPage.Window.Eval(codeToRun.ToString()); } catch { MessageBox.Show("You must enable popups to view reports. Safari browser is not supported.", "Error", MessageBoxButton.OK); } } else { MessageBox.Show("You must enable popups to view reports. Safari browser is not supported.", "Error", MessageBoxButton.OK); } }
/// <summary> /// Конструктор /// </summary> public PopupSize(PopupWidth width, int height) : this() { Width = width; Height = height; }