Why would my Silverlight 4 Out-of-Browser application just display white?
My Silverlight application works fine when running in a开发者_JAVA百科 browser.
But when I install it as an out-of-browser application, the Window frame comes up with an appropriate icon and title, but the content of the window is just white. It is in the start menu but when I close it and open again, it is still blank.
I reproduced this on Windows 7 and Windows XP.
What could be causing my silverlight application to show only white when running out-of-browser?
Here are the settings I used:
alt text http://www.deviantsart.com/upload/rp8ltr.png
I found it: I had forgotten to wrap some DOM access during initialization which is apparently too early for OOB to show any kind of error, this fixed it:
if (!Application.Current.IsRunningOutOfBrowser)
{
...
}
精彩评论