910209 - 哪里有ResizeEnd事件? [英] 910209 - Where's ResizeEnd event?

查看:71
本文介绍了910209 - 哪里有ResizeEnd事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要知道何时调整大小在我的Silverlight应用程序中结束。我怎么能这样做?

hi
i need to know when resize ends in my Silverlight application. how can i do that?

推荐答案

你能否使用FrameworkElement.SizeChanged事件?每次调整大小时都会多次调用它,但也会调用最后一次调整大小事件。

此MSDN说明可能更好


此外,SizeChanged事件处理程序可能正是您要查找的内容 MSDN链接,了解有关此内容的更多信息
Could you not use the FrameworkElement.SizeChanged Event? it is called multiple times each time it is resized but is also called for the very last resize event.

This MSDN explanation might be better

Additionally the SizeChanged Event handler may be what you are looking for MSDN link for more information about this one


thanx 4回复,但我需要一种方法来区分多个调整大小事件和最后一个。我怎么能意识到这是最后一次调整大小并且用户已经结束调整大小并释放了鼠标左键?我需要知道何时触发。其他resize事件对我没用。每次用户调整浏览器窗口大小时,我想只获得一个resize事件,最后一个事件。
thanx 4 the reply, but i need a way to distinguish between multiple resize events coming and the last one. how can i realize this is the last resize and the user has ended resizing and has released the left mouse button? i need to know when this is triggered. the other resize events is not useful for me. i want to get only one resize event, the last one, every time user resizes the browser window.


然后我能想到的唯一解决方案是存储表单大小或其他什么,并且每次释放鼠标按钮时检查大小是否与存储的值不同,如果它存储新值以供将来比较并触发其余代码,我不认为有一个事件完全符合您的要求所以除非你写一些能为你做的事情,否则你很难找到它。你正在寻找的事件是非常具体的,可能很难找到,


如果你解释为什么你需要知道它什么时候结束也许我们可以提供一个替代方案,但是有限的信息很难提出任何建议,但已经记录了什么,显然不是你需要的。虽然我很欣赏有时你不能放弃你的所有代码有时它给我们所有人提供了很多帮助,即使它是伪代码,你的代码只应该被触发到最终的大小改变事件?或者只是你在被解雇时挑剔?
then the only solution i can think of it storing the size of the form or whatever, and everytime the mousebutton is released check to see if the size is different from the stored values, if it is store the new values for future comparisons and fire the rest of your code, i dont think there is an event that does exactly what you ask so you will have a hard time finding it unless you write something that does it for you. the event you are looking for is very specific and likely to be hard to find,

if you explain Why you need to know when its finished perhaps we can provide an alternative, but with the limited information were given its hard to suggest anything but whats already documeted, which apparently isnt what you need. though i appreciate sometimes you cant give away all your code sometimes its a lot of help to us all to be given an example, even if it is in pseudo code, is there a reason your code should only be fired on the final size changed event? or is it just you being picky about when it is fired?


这篇关于910209 - 哪里有ResizeEnd事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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