在运行应用程序时,如何在IE中获得垂直和水平滚动条? [英] How do you get Vertical and Horizontal scroll bars in IE when running an app?

查看:60
本文介绍了在运行应用程序时,如何在IE中获得垂直和水平滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Silverlight Web应用程序,我在Expression Blend 2(SP 1)中创建了UI。当我运行应用程序(在Ex Blend中点击F5)时,UI不适合我笔记本电脑上的IE窗口,但没有IE滚动条。

如何获取IE滚动条所以我可以滚动到整个UI?

谢谢,

-Cary

I have a Silverlight web app and I created the UI in Expression Blend 2 (SP 1). When I run the app (hit F5 in Ex Blend), the UI does not fit into the IE window on my laptop, but there are no IE scroll bars.

How do I get the IE scroll bars so I can scroll to the entire UI?

Thanks,

-Cary

推荐答案

很奇怪,我的第一个回复以某种方式丢失了。

很确定问题是主机页面的silverlight对象标签被设置为按比例缩放到整个浏览器宽度/高度(即:width =" 100%" ; height =" 100%")。这个宽度/高度可能设置在< object>上。直接使用.html模板示例,或者< asp:Silverlight>如果您正在使用ASP.NET .aspx主机模板页面,则标记。

所以正在发生的事情是对象本身正在使用浏览器调整大小,而silverlight在内部剪切任何不适合的内容。您可以做一些事情。

您可以执行以下操作之一:
)A)找出固定布局所需的最小宽度/高度,然后打开主机页面,在< object>上设置该高度标签或< asp:Silverlight>标记(取决于您是否使用.html托管示例或.aspx托管示例)。这会像:< object .... width =" 600px"高度= QUOT; 500px的">< /对象> (假设您的内容需要600w 500h等等。)B)在ScrollViewer控件中将所有内容包装在您的silverlight应用程序中,现在,当浏览器按比例缩小时,silverlight应在内部显示滚动条,以便内容被剪裁。
)C)使用网格控件将您的布局重新设计为可缩放的布局,您可以使用*字符设置行/列尺寸,这意味着"使用剩余的空间"等。

如果您对其中一个选项有更多疑问,请告诉我。
Weird, my first reply got lost somehow.

Pretty sure the issue is that the hosting page's silverlight object tag is set to scale to the whole browser width/height (ie: width="100%" height="100%"). This width/height is probably set either on the <object> directly if you are using the .html template example, or the <asp:Silverlight> tag if you are using the ASP.NET .aspx hosting template page.

So what is happening is that the object itself is resizing with the browser and silverlight is internally clipping anything that doesnt fit. You can do a few things.

You can do one of the following:
A) Find out what the required minimum width/height of your fixed layout is, then open the hosting page and set that height on the <object> tag or the <asp:Silverlight> tag (depending on if you used the .html hosting example or the .aspx hosting example). This would looke like: <object .... width="600px" height="500px"></object> (assuming that your content needed 600w 500h, etc.

B) Wrap everything in your silverlight app in a ScrollViewer control, now silverlight should internally display scrollbars when the browser is scaled down such that content would be clipped.

C) Re-design your layout as a scalable layout using the Grid control where you can set row/column dimensions with the * character which means "use the rest of the space", etc.

If you have more questions about one of these options, just let me know.


这篇关于在运行应用程序时,如何在IE中获得垂直和水平滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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