You can re-use brushes and other resources used by Ribbon, Navigation Pane and Docking WPF controls in your application very easily for a consistent look and feel.

The resources provided by our controls are keyed using ComponentResourceKey and static members of RibbonColors, DockColors and NavigationPaneColors classes that are used as ID’s.

Explore the members of RibbonColors, DockColors and NavigationPaneColors classes since names for ID’s are self explanatory. For example ID RibbonColors.RibbonTabBackground describes the resource that is used to render the Ribbon Tab Background.

To use this resource on your control you simply assign it like this:

<Label realsrc="{DynamicResource  {ComponentResourceKey TypeInTargetAssembly=dc:Ribbon,  ResourceId={x:Static dc:RibbonColors.RibbonTabBackground}}}" Content="My Label" />

Important thing to note in the construction of ComponentResourceKey is the type used specified by TypeInTargetAssembly. All Ribbon controls used Ribbon as type. All docking controls use DockSite as type. All NavigationPane controls use NavigationPane as type.

Here is example that uses the Navigation Pane resources:

<Label realsrc="{DynamicResource {ComponentResourceKey TypeInTargetAssembly=dc:NavigationPane, ResourceId={x:Static dc:NavigationPaneColors.NavPaneTitleBackground}}}" Content="My Label" />

Related posts:

  1. How to customize WPF Office 2007 Color Schemes
  2. All you need to know about Color Input controls in DotNetBar for WPF
  3. How to right-align controls added to the Ribbon Tab area
  4. How to create Backstage application menu in DotNetBar for WPF Ribbon Control
  5. How To Start Using Wpf-Ribbon Control