如何更改Fluent Ribbon UI后台颜色

问题描述 投票:2回答:2

如何更改Fluent Ribbon UI后台菜单的颜色,默认为蓝色?

wpf ribbon fluent fluent-ribbon
2个回答
5
投票

您需要设置Backstage背景色。这将更新MenuButton,BackstageTabItems和后台面板角落的swish。下面的示例将颜色设置为红色。

<Fluent:Backstage Background="Red">
    <Fluent:BackstageTabControl>
        <Fluent:BackstageTabItem Header="New"/>
        <Fluent:BackstageTabItem Header="Print"/>
    </Fluent:BackstageTabControl>
</Fluent:Backstage>

3
投票

版本3.4.0:您可以使用MetroColors.ThemeColorKey属性更改功能区主题颜色。将以下代码放入App.xaml文件中:

<Application.Resources>
    <ResourceDictionary>

        <!--  This "override" is needed to change the ribbon theme color, do not remove!  -->
        <Color x:Key="{x:Static fluent:MetroColors.ThemeColorKey}">#FFF66AC1</Color>
...
© www.soinside.com 2019 - 2024. All rights reserved.