Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to apply custom style to AvalonDock

Tags:

wpf

avalondock

Does anyone know how I can change the font properties of a title for LayoutAnchorable and LayoutDocument in AvalonDock 2.0? I would like to be able to apply a style that is used everywhere in my WPF application for consistency.

like image 345
Ceco Avatar asked Jan 14 '23 01:01

Ceco


1 Answers

You can create a theme to use across your application. There are a couple of themes available in the AvalonDock distribution that can be used as an example or template to create your own (e.g. VS2010 theme).

You then just apply it to your DockingManager:

<dock:DockingManager x:Name="dockingManager"
                     AnchorablesSource="{Binding DockModel.Tools}"
                     DocumentsSource="{Binding DockModel.Documents}"
                     ActiveContent="{Binding DockModel.ActiveContent, Mode=TwoWay}">

  <dock:DockingManager.Theme>
     <adCustom:DarkBlossomTheme />
  </dock:DockingManager.Theme>
  <dock:LayoutRoot/>
</dock:DockingManager>
like image 124
MrDosu Avatar answered Jan 21 '23 18:01

MrDosu