gpt4 book ai didi

wpf - 将扩展器重置为默认折叠行为

转载 作者:行者123 更新时间:2023-12-04 07:12:05 27 4
gpt4 key购买 nike

我在 Resizer 中使用了扩展器(带有调整大小抓手的 ContentControl),并且当控件最初出现时它会正确展开/折叠。一旦我调整它的大小,扩展器将不会正确折叠,如下所述。我在我的应用程序上运行了 Snoop,我没有看到 Expander 或其组成部分设置了任何高度。

我将如何说服 Expander 再次正确折叠?或者修改 Resizer 以不让 Expander 伤心也可以。

扩展器文档说:

"For an Expander to work correctly, do not specify a Height on the Expander control when the ExpandDirection property is set to Down or Up. Similarly, do not specify a Width on the Expander control when the ExpandDirection property is set to Left or Right. When you set a size on the Expander control in the direction that the expanded content is displayed, the area that is defined by the size parameter is displayed with a border around it. This area displays even when the window is collapsed. To set the size of the expanded window, set size dimensions on the content of the Expander control or the ScrollViewer that encloses the content."

最佳答案

我通过在 Expander 中移动 Resizer 解决了这个问题,但是我在其他地方遇到了 Expander 问题,所以如果有人有它,我仍然希望得到答案。

谢谢

关于wpf - 将扩展器重置为默认折叠行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/159470/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com