当其中一个文本框折叠时,如何同等地展开两个文本框(三个中的一个)?
我有三个文本框...在堆栈面板内(方向=水平)。
每个都有相同的宽度。如果其中一个折叠起来,我希望另外两个共享该空间。
我的意思是如果 15o 是总宽度 (50 * 3)。如果一个文本框折叠起来,每个文本框应该占据75。
请帮我做到这一点。谢谢
I have three textboxes...inside a stack panel (orientation = Horizontal).
each has same width. If one of them is collapsed, I want other two to share the space.
I mean if 15o was total width (50 * 3). If one is collapsed, each textbox should occupy 75.
Please help me to do that. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一个简单的方法是将它们放入 UniformGrid 中。如果将其设置为
Rows="1"
,那么它将为每个(非折叠)子项生成一列,并使所有列的宽度相等。A simple way is to put them into a UniformGrid. If you set it to
Rows="1"
, then it will make one column for each (non-collapsed) child, and make all the columns equal widths.