I have the following code in a click handler of a Silverlight application (4). I have two problems getting this to work.
1) While the browser doesn’t have pop-ups disable IsPopupWindowAllowed is returning false. Why?
2) If I ignore the if test, the window doesn’t show. 🙁
if ( HtmlPage.IsPopupWindowAllowed )
{
var options = new HtmlPopupWindowOptions
{
Left = 0,
Top = 0,
Width = 500,
Height = 400,
Scrollbars = false,
Status = false
};
HtmlPage.PopupWindow(new Uri("http://www.monster.com"), "_blank", options);
}
Make sure all the following is done correctly, as mentioned on this page, http://msdn.microsoft.com/en-us/library/system.windows.browser.htmlpage.popupwindow%28v=vs.95%29.aspx