Firefox and Silverlight

微笑、不失礼 提交于 2020-01-25 04:06:06

问题


I'm developing a silverlight site, using deepzoom. When I call a function to ArrangeImages(), in IE, the image arranges correctly, using 100% of the screen. In Chrome it works as well. In Firefox, though, the msi container only uses around 80% of the screen. I'm resizing it using these 2 lines of code below:

msi.Height = App.Current.Host.Content.ActualHeight;
msi.Width= App.Current.Host.Content.ActualWidth;

Any idea on how to solve this, or why the heck is this happening?

Thanks for your help.


回答1:


I'm guessing that the problem is either:

  1. The Silverlight object tag or Javascript is using a 100% height and width div, which doesn't work in Firefox unless all the parents have height and width set. You can verify this is the problem by setting a background color for the entire Silverlight object. If so, you can either specify a pixel height and width, or you can make sure height and width are set for all the parent elements for the Silverlight object.
  2. You may be setting the height and width before they're available. It's recommended that you access them in the OnResize event (see the "Important Note" on this MSDN page). What event are you setting them from?


来源:https://stackoverflow.com/questions/1448898/firefox-and-silverlight

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!