This project is read-only.

Dockmanager set Theme in Resourcedictionary

Dec 6, 2016 at 4:14 PM
Edited Dec 6, 2016 at 4:36 PM

i am using Avalondock to display my windows which works pretty perfect!
After some years of use i am now developing differnt styles (WPF, XAML) for my applications

For example, i have a dark and a light theme. One should use the avalon light theme the other one the dark theme.

I want to set the style for my application only one time in my app.xaml, therefore i wrote following code:
<Application x:Class="generics.App"
        <ResourceDictionary Source="pack://application:,,,/style;component/Themes/Dark/theme.xaml" />

<ResourceDictionary xmlns=""

    <SolidColorBrush x:Key="textcolor" Color="#F1F1F1" />
    <SolidColorBrush x:Key="panelbackground" Color="Transparent" />
    <SolidColorBrush x:Key="statusbarbackground" Color="#007ACC" />

    <Style TargetType="avalon:DockingManager">
        <Setter Property="Theme">
                <avalon:Vs2013DarkTheme />

    <Style TargetType="{x:Type StackPanel}">
        <Setter Property="Background" Value="{StaticResource panelbackground}" />
If i use this theme, no avalon controls are displayed at all, and i am receiving an cycling reference error on the style property of the Dockingmanager.

if i set the theme in my mainwindow like this:
 <bc:DockManager Grid.Row="1" Name="bcDockingmanager">
                <avalon:Vs2013DarkTheme />
it works fine.

Is there a way to set the avalon theme in my main theme?

KR Manuel