调整浏览器大小=重新定位控件 [英] Resizing browser = reposition controls

查看:127
本文介绍了调整浏览器大小=重新定位控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我知道以前曾在另一个问题中提出过此问题,但没有对此做出回应(问题已于1月20日提出).

我已经申请了Silverlight.我在上面放了一些控件和东西...这里没问题.
我已经创建了一个用户控件,当用户按下按钮时,该控件需要从右向左滚动到屏幕.容易吧?使用情节提要...检查!完毕!固定的!就像魅力一样.

但是...(!)一旦我调整浏览器的大小,用户控件就不会在应该启动的位置启动.

我很想在这个问题上添加一些代码,但是在这里确实很大.我希望有人能给我提示在哪里寻找解决方案.

Hello,

I know this has been asked before in a different question, but there was no response to that (and question was placed on 20th of january).

I have made a silverlight application. I placed some controls and stuff on it... No problems here.
I have made a usercontrol that needs to scroll in to screen, from right to left, when the user hits a button. Easy, right? Use a storyboard... Check! Done! Fixed! Works like a charm.

BUT...(!) as soon as I resize the browser the usercontrol does not start where it is supposed to start.

I would love to add some code to this question, but it''s really to big to place here. I hope someone can give me a hint where to look for the solution.

Thanks in advance!

推荐答案

是否有可能在元素的根部设置了固定的大小?

我认为您有两种选择.第一个方法是设置根控件的Clip属性(我认为您必须为此设置一个矩形...应该很容易在Google上找到).

另一个选择是根据浏览器的大小动态调整应用程序的大小.这是有关堆栈溢出的示例 [
Is it possible that at the root of your element you''ve set a fixed size?

I think you have two options. The first would be to set the Clip property of your root control (I think you have to setup a rectangle for that...should be easy to google).

The other option is to dynamically size the app based on the size of the browser. Here''s an example on Stack Overflow[^].

Cheers.


这篇关于调整浏览器大小=重新定位控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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