Monday, October 18, 2010

Bug in Silverlight 4 : HtmlPage.PopupWindow cannot resize poup

When trying to open a resizable popup window throught Silverlight, don't try to find out why it doesn't work with IE in some cases, works with FF in some others, etc... don't waste your time, simply because HtmlPage.PopupWindow is flawed.

Indeed, this sounds silly, but  because of a spelling mistake that is around for at least a year, and Microsoft is aware of that.

Take a look at Reflector :

The bit of code appends an invalid JavaScript command ("resizeable" instead of "resizable").

How to solve it ? ... wait for a patch..., or use the good old JavaScript, for example :

string javascriptOpenWindow = "'" + link + "','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=1,resizable=1,width=1024,height=800,left=20,top=20')";

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.