I have a WPF \ C# App with a ribbon.
I want to change the ribbon's main button's color.
Ribbon Application Menu Button
Any ideas?
<UserControl x:Class="AccountantDatabase.Controls.BarRibbon"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:AccountantDatabase.Controls"
mc:Ignorable="d">
<Ribbon SelectedIndex="0" IsMinimized="True">
<Ribbon.ApplicationMenu>
<RibbonApplicationMenu KeyTip="A">
<RibbonApplicationMenuItem Header="Options"
Click="RibbonMenuItemOptions_Click"/>
<RibbonApplicationMenuItem Header="Exit"
Click="RibbonMenuItemExit_Click"/>
</RibbonApplicationMenu>
</Ribbon.ApplicationMenu>
<RibbonTab Header="Home" KeyTip="H">
</RibbonTab>
<RibbonTab Header="Filter" KeyTip="F">
</RibbonTab>
</Ribbon>
</UserControl>
Solution:
<Ribbon>
<Ribbon.ApplicationMenu>
<RibbonApplicationMenu Background="Red" BorderBrush="Red">
<!-- Content -->
</RibbonApplicationMenu>
</Ribbon.ApplicationMenu>
</Ribbon>
Output:
Template for Ribbon: Link
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.