WPF 功能区 - 隐藏快速访问工具栏 [英] WPF Ribbon - Hide quick access toolbar

查看:56
本文介绍了WPF 功能区 - 隐藏快速访问工具栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 WPF 的功能区中隐藏快速访问工具栏?

how do you hide Quick Access Toolbar in a WPF's Ribbon?

推荐答案

当 Ribbon 控件位于 RibbonWindow 中时,快速访问工具栏会自动隐藏.如果不是,则似乎无法隐藏它.我已经在这个问题上工作了几个小时,但无法正确隐藏它.但是有一个简单的解决方法:将 Ribbon 控件放在面板内部,并为其设置一个负的上边距,这样它就会滑出面板.将面板的 ClipToBounds 属性设置为 true,QAT 将被隐藏.顺便说一句 - WPF 有多个 Ribbon 实现,甚至是 Microsoft 自己的(Fluent Ribbon" 和MicrosoftRibbon for WPF"),所以下次你应该提到你在谈论哪一个.

The Quick Access Toolbar is automatically hidden when the Ribbon control is in a RibbonWindow. When it is not, it seems impossible to hide it. I have already worked hours on this issue and was unable to hide it properly. But there is one simple workaround: Place the Ribbon control inside of a Panel and give it a negative top margin so it will slide outside of the Panel. Set the Panel's ClipToBounds property to true and the QAT will be hidden. By the way - there are multiple Ribbon implementations for WPF, even by Microsoft themselves ("Fluent Ribbon" and "Microsoft Ribbon for WPF"), so next time you should mention which one you are talking about.

这篇关于WPF 功能区 - 隐藏快速访问工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆