使用 Microsoft Ribbon for WPF 时使内容展开和折叠

发布于 2024-10-07 00:32:12 字数 403 浏览 5 评论 0原文

我不明白如何在我的应用程序中获取 MS Word 中显示的默认功能区最小化行为(使用 < a href="http://wpf.codeplex.com/wikipage?title=WPF%20Ribbon%20Preview" rel="nofollow">MS Ribbon for WPF)。 (具体来说,当功能区最小化时,内容区域向上移动以填充功能区先前填充的空间。)

如果我只是将一个元素放入包含功能区的网格中,当功能区最小化时,它不会自动移动以填充空间

有什么指点吗?

I don't understand how to get the default ribbon minimization behavior shown in MS Word in my app (using MS Ribbon for WPF). (Specifically, when the ribbon is minimized, the content area moves up to fill the space that the ribbon previously filled.)

If I just put an element in the Grid containing my Ribbon, it doesn't automatically move to fill the space when the ribbon is minimized.

Any pointers?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜妞爱困 2024-10-14 00:32:12

有趣的是,你可以不断地搜索,然后当你最终提出问题时,你自己就能找到答案。

就像将功能区放入具有两行的网格中一样简单,顶部为 Height="Auto",底部为 Height="*"。请参阅 http://wpf.codeplex.com/Thread/View.aspx?ThreadId= 39958。诀窍是记住将 Grid.Row 属性添加到功能区和内容控件。

It's funny how you can search and search, then when you finally ask the question you find the answer yourself.

It's as simple as putting the ribbon in a Grid with two Rows, the top with Height="Auto" and the bottom with Height="*". See http://wpf.codeplex.com/Thread/View.aspx?ThreadId=39958. The trick is to remember to add the Grid.Row property to the ribbon and your content control.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文