WPF扩展器大小问题
我正在使用 ItemsControl
放置 n 个 Expander
。我的 ItemsControl
将放置在高度为 600 的 Grid
中(例如)。我想确保我的 ItemsControl
将始终占据整个可用的 Height
,这样做可以扩展一些 Expander
。
这样做的最佳方法是什么?
I am using an ItemsControl
to place n number of Expander
s. My ItemsControl
will be placed in a Grid
with height 600 (for example). I want to make sure my ItemsControl
will always occupy the entire available Height
, to do so it can expand some of the Expander
s.
What will be the best approach to do so?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种方法是将控件的
Height
和Width
属性绑定到父级的ActualWidth
和ActualHeight
属性One way would be to bind the
Height
andWidth
properties of your control to the parent'sActualWidth
andActualHeight
properties