Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用一个ItemsControl来放置 n 个Expanders。我的ItemsControl将被放置在一个Grid高度为 600 的地方(例如)。我想确保 myItemsControl将始终占据整个 available Height,这样做可以扩展一些Expanders.
ItemsControl
Expander
Grid
Height
这样做的最佳方法是什么?
一种方法是将控件的HeightandWidth属性绑定到父控件的ActualWidthandActualHeight属性
Width
ActualWidth
ActualHeight