使用 Microsoft Ribbon for WPF 时使内容展开和折叠
我不明白如何在我的应用程序中获取 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有趣的是,你可以不断地搜索,然后当你最终提出问题时,你自己就能找到答案。
就像将功能区放入具有两行的网格中一样简单,顶部为
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 withHeight="*"
. See http://wpf.codeplex.com/Thread/View.aspx?ThreadId=39958. The trick is to remember to add theGrid.Row
property to the ribbon and your content control.