The RadRibbonBar can be styled by creating an appropriate Style and setting it to the Style property of the control.
You have two options:
- To create an empty style and set it up on your own.
- To copy the default style of the control and modify it.
This topic will show you how to perform the second one.
Modifying the Default Style
To copy the default style, load your project in Expression Blend and open the User Control that holds the RadRibbonBar. In the 'Objects and Timeline' pane select the RadRibbonBar you want to style.
From the menu choose Object -> Edit Style -> Edit a Copy. You will be prompted for the name of the style and where to be placed.
Tip |
|---|
| If you choose to define the style in Application, it would be available for the entire application. This allows you to define a style only once and then reuse it where needed. |
After clicking 'OK', Expression Blend will generate the default style of the RadRibbonBar control in the Resources section of your User Control. The properties available for the style will be loaded in the 'Properties' pane and you will be able to modify their default values.
If you go to the 'Resources' pane, you will see an editable list of resources generated together with the style and used by it. In this list you will find the brushes, styles and templates needed to change the visual appearance of the RadRibbonBar. Their names indicate to which part of the RadRibbonBar's appearance they are assigned.
- RibbonBackgroundBrush - a brush, that represents the background color behind the ribbon tabs.
- RibbonForegroundBrush - a brush that represents the foreground color for the RadRibbonBar.
- RibbonLowerBackgroundBrush - a brush, that represents the background color behind the ribbon tabs' content.
- RibbonDividerLightBrush - a brush, that represents the fill of the separators used in the RadRibbonBar.
- RibbonDividerDarkBrush - a brush, that represents the border color of the separators used in the RadRibbonBar.
Note |
|---|
An explanation of the other resources can be found in the following topics: |
Tip |
|---|
| Changing the value of the resources can be done by clicking on the color indicator or the icon next to them. |
Modify the resource to bring the desired appearance to the RadRibbonBar. For more detailed information, please, view the Example section below.
Tip |
|---|
To learn more about the template of the RadRibbonBar read the Template Structure topic.
|
Example
For example, select the RibbonBackgroundBrush brush resource and modify it in order to change the background of the RadRibbonBar's upper part.
Modify the RibbonLowerBackgroundBrush too, in order to make the background consistent.
Here is a snapshot of the result.
See Also