Firefox和Silverlight [英] Firefox and Silverlight

查看:172
本文介绍了Firefox和Silverlight的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用deepzoom开发Silverlight网站. 当我在IE中调用ArrangeImages()函数时,图像使用100%的屏幕正确排列.在Chrome中也可以正常使用. 但是,在Firefox中,msi容器仅使用大约80%的屏幕.我正在使用下面的这两行代码来调整其大小:

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?

感谢您的帮助.

推荐答案

我猜是问题所在:

  1. Silverlight对象标签或Javascript使用了100%的高度和宽度div,该建议您在OnResize事件中访问它们(请参见此MSDN页面上的重要说明" .您是从什么事件设置它们的?
  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?

这篇关于Firefox和Silverlight的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆