WPF 功能区

编程入门 行业动态 更新时间:2024-10-28 09:29:23
本文介绍了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 功能区

本文发布于:2023-11-26 04:36:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1632649.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:功能   WPF

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!