Answered Changing RibbonGroup Header background color

  • Friday, April 08, 2011 6:43 PM
     
     

    Hi,

    I am working with RibbonControl Library 4.0 and looking to change the background color of RibbonGroup Header. Is there a way I can change the background color.

    Thanks,

    Balaji

All Replies

  • Friday, April 08, 2011 7:35 PM
     
     

    Not sure are you looking for something like below

    <ribbon:RibbonGroup x:Name="Group1" 

                                        Header="Group1" Background="Red">


    Ajosh Jose
  • Friday, April 08, 2011 8:03 PM
     
     

    Thanks Jose for the response. I am looking to set the background for the "Header" property alone. I want the "Red" color to apply only for "Group1" text not to the entire RibbonGroup.

    Balaji

  • Friday, April 08, 2011 8:18 PM
     
     Answered Has Code

    You may try either
     <ribbon:RibbonGroup.HeaderTemplate>
                <DataTemplate>
                  <TextBlock Text="Group1" Background="Red"/>
                </DataTemplate>
              </ribbon:RibbonGroup.HeaderTemplate>
    
    or 
    
     <ribbon:RibbonGroup.Header>
                <TextBlock Text="Group1" Background="Red"/>
              </ribbon:RibbonGroup.Header>

    Ajosh Jose
    • Marked As Answer by BalajiTE Monday, April 11, 2011 1:18 PM
    •  
  • Friday, April 08, 2011 8:19 PM
     
     
    Haven't worked with the new ribbon much, but u can replace the string with a TextBlock that has a background probably.
  • Monday, April 11, 2011 1:18 PM
     
     
    The HeaderTemplate one worked Jose. Thanks for your help.