如何让Expander向上扩展
我有一个数据网格和一个扩展器,如下所示:
<Grid>
...
<DataGrid ....>
<Expander ...>
</Grid>
我希望数据网格尽可能大,扩展器在开始时尽可能小。 当用户单击扩展器时,我希望它向上而不是向下扩展,并让数据网格收缩。
谢谢!
I have a dataGrid and an expander as follows:
<Grid>
...
<DataGrid ....>
<Expander ...>
</Grid>
I want the datagrid as big as possible and the expander as small as possible at the begining. When a user clicks the expander, I want it to expand upwards instead of downwards, and have the datagrid shrink.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在Grid中定义行高,然后将扩展器放在最底行,让Grid进行排序。
* - 此高度为一个单位,其中总高度除以单位数并分配。 因此,如果高度为 300 并且有两行 2* 和 *,那么它们将分别为 200 和 100。
自动 - 这是内容的最小高度。
You can define the row heights in the Grid, and then put the expander in the bottom row, and let the grid sort it out.
* - This height is one unit, where the total height is divided by the number of units and apportioned out. So if the height was 300 and there were two rows, 2* and *, then they would be 200 and 100 each.
Auto - This is whatever the minimum height of the content is.