none
Changing RibbonGroup Header background color

    Question

  • 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

    Friday, April 08, 2011 6:43 PM

Answers


  • 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:18 PM

All replies

  • Not sure are you looking for something like below

    <ribbon:RibbonGroup x:Name="Group1" 

                                        Header="Group1" Background="Red">


    Ajosh Jose
    Friday, April 08, 2011 7:35 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:03 PM

  • 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:18 PM
  • Haven't worked with the new ribbon much, but u can replace the string with a TextBlock that has a background probably.
    Friday, April 08, 2011 8:19 PM
  • The HeaderTemplate one worked Jose. Thanks for your help.
    Monday, April 11, 2011 1:18 PM