Hello, I am currently trying to modify the default styles of the ribbon. I do this by actually modifying the RibbonGeneric.xaml file directly. This usually works well, but now I have an issue with the styling of the ApplicationMenu2010Items. My problem is that I do not manage to successfully change the foreground of the ApplicationMenu2010Items.
In the RibbonGeneric.xaml there is a section for the Applicationmenu2010Item which starts with:
<ControlTemplate TargetType="igRibbon:ApplicationMenu2010Item" x:Key="{x:Static igRibbon:ApplicationMenu2010Item.ButtonTemplateKey}">
a little bit further down the triggers that should influence the foreground can be found:
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="Background" Value="{Binding Path=(igRibbon:XamRibbon.Ribbon).ApplicationAccentColor, RelativeSource={RelativeSource Self}, Converter={StaticResource overlayBlendConverter}, ConverterParameter=#FFDDDDDD}" />
<Setter Property="Foreground" Value="{Binding Path=Background.Color, RelativeSource={RelativeSource Self}, Converter={StaticResource calculatedForegroundConverter}}" />
<Setter TargetName="outerBorder" Property="BorderBrush" Value="{Binding Path=(igRibbon:XamRibbon.Ribbon).ApplicationAccentColor, RelativeSource={RelativeSource Self}, Converter={StaticResource overlayBlendConverter}, ConverterParameter=#FF999999}" />
<Setter TargetName="innerBorder" Property="BorderBrush" Value="#DDFFFFFF" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource {x:Static igRibbon:RibbonBrushKeys.GrayTextBrushKey}}" />
</ControlTemplate.Triggers>
Even if I replace the Values outlined in bold font with explicit values like Red, Green, etc. this does not have any effect. The other trigger controlled properties work however as expected. It is only for the foreground properties that I have this issue. Is there any explanation for that?
Thanks and best regards,
Rainer
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Hello Rainer,
Thank you for your post. I have been looking into it and I created a sample project for you following your scenario and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Looking forward for your reply.