<igRibbon:XamRibbon Name="testRibbon"> <igRibbon:RibbonTabItem Name="testTabItem" > <igRibbon:RibbonGroup Name="grp" Tag="mygroup" > <igRibbon:RibbonGroup.Items> <igRibbon:ButtonTool Content="TestButton" Name="myButton"> </igRibbon:ButtonTool> </igRibbon:RibbonGroup.Items> </igRibbon:RibbonGroup> </igRibbon:RibbonTabItem></igRibbon:XamRibbon>
I am trying to style the ButtonTool myButton, i am using the RibbonGeneric.Xaml resourcefiles to style my application. Most of the colours that are in there are pretty good for my use. I only want to change the "MouseOver" and "MousePressed" colors for buttons that are displayed on the RibbonBar.I found a style that targets the buttontool in the RibbonGeneric<Style TargetType="{x:Type igRibbon:ButtonTool}">it has a template RibbonButtonToolTemplate (do i need to make the change there ?Am i on the right track ?
Any help is greatly appreciated.
Annelies
The elements of the XamRibbon have been styled/designed such that they use dynamic references to obtain the brushes. Also the chrome for the button tools is not done using xaml but in code to reduce overhead so for any element using the RibbonButtonChrome class you must either retemplate the element or provide a different brush for the desired area. In the case of the RibbonButtonChrome which is what you would be dealing with, you would need to change brushes such as ButtonGroupPressedHottrack(Center|Border)FillKey, ButtonPressedBorderDarkFillKey, ButtonToolPressedHottrackBorderFillKey, etc.
e.g.