WPF Ribbon - Hide quick access toolbar

前端 未结 6 1061
野趣味
野趣味 2021-02-19 05:26

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

6条回答
  •  旧巷少年郎
    2021-02-19 05:43

    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.

提交回复
热议问题