获取 Silverlight Popup 控件中内容的实际高度
我需要获取打开的弹出控件内显示内容的实际高度:
问题:
我想在弹出窗口内的网格中显示大量数据。如果此内容高于浏览器高度,则此内容将在窗口末尾被裁剪。
我有什么方法可以获取此内容的高度(我知道弹出窗口不在视觉树中)?
I need to get the actual height of the displayed content inside an opened pop up control:
Problem:
I want to show a lot of data in a grid inside a pop up. If this content became higher than the browser height, this content is cropped at the end of the window.
I there any way to get the height of this content (i know that pop up isn't in the visual tree)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一旦所有控件都已完成,请尝试调用 UpdateLayout()已添加到您的弹出窗口中。
然后,您将能够获取 ActualHeight弹出窗口的。
这会带来一些性能开销,因此请尝试尽可能少地调用它。
Try calling UpdateLayout() once all controls have been added to your popup.
You will then be able to get the ActualHeight of the popup.
This has a bit of a performance overhead so trying calling it as little as possible.