I would like to colorised the Window title bar of a XamRibbonWindow.
(http://imagizer.imageshack.us/a/img835/9102/pxdc.png)
In fact my final goal would be to have a window like this Exemple.png
(https://imagizer.imageshack.us/v2/1440x224q90/845/uihz.png)
Thanks for you help
Hello and thank you for posting!
After reviewing your requirements I have created a sample project for you to demonstrate how the caption and the border background colors could be modified using the default styles for the XamRibbon located at the Infragistics folder: http://ko.infragistics.com/community/forums/t/89317.aspx.
In the RibbonWindowContentHost the Grid beckground property could be set to some value like this:
<igRibbon:RibbonWindowBorder BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Name="WindowBorder" />
<!--<igWindows:CardPanel>-->
<Grid Background="Red">
<Grid.RowDefinitions>
<RowDefinition Height="{Binding Path=ChildDesiredHeight, ElementName=ribbonSize}" />
<RowDefinition Height="*" />
<RowDefinition Height="{Binding Path=ChildDesiredHeight, ElementName=statusSize}" />
</Grid.RowDefinitions>
And in the XamRibbon style the PART_XamRibbonCaption Background property could be changed to some custom value:
<Border Background="Red" CornerRadius="3,3,0,0" Grid.ColumnSpan="3" x:Name="PART_XamRibbonCaption" Height="Auto" />
Please feel free to test the attached project and ask if you have any questions.
Thanks for your answer.
I forget to mention that I would like to have the Window with button like Office or Visual Studio (in Windows 7 also)
For this I set Theme="Office2013" on my Ribbon, but this override your change.
Have you an idea?
The styles are overridden when the theme is set. If you would like to resolve this you could set the custom style in the control’s resources. In this case the XamRibbon style should be moved to the XamRibbon.Resources section instead of setting it in the XamRibbonWindow.Resources.
Hi,
I am just checking if my last reply was helpful for you.
If you require any further assistance, please do not hesitate to ask.
It helps but not completely.
I still have issue. This work fine but this hide the icon on top left and the possibility to add button on the top bar
(For information I'm on Windows 7)
If you have a samble or something it will be helpful.
Regards
Hello,
The project I have uploaded before uses the default theme for version 13.2 which has a little modification in 14.1. It is better to copy and modify the 14.1 styles in order to change the color of the header. Please feel free to have a look at the attached project and use it as basic for your implementation.
This solution doesnt work in 15.2. With Office2013 theme style from Default Styles directory. Caption stay "Gray" regardless any changes with Grid Background in RibbonWindowContentHost. I want change Color of whole Ribbon in Office2013theme from White to DarkGrey but I still want to have full control with Controls look by implementing RibonOffice2013 theme file as ResourceDictionary.
I tried use ResourceWasher but it only works with themes from Infragistics Theme List, it dosent work with custom theme.
I have the same requirement (change the whole ribbon background color from white to another color, using the Office 2013 theme).
Please, let us know if it's possible or not.