Dirkster99/AvalonDock

How to change AccentColors Vs2013DarkTheme ?

gaetandezeiraud opened this issue · 1 comments

How i can change the AccentColor to another color?
I saw this issues #12 and #168 but doesn't help me very much.

I tried the following, but without success:

<DockingManager x:Name="dockManager">
    <DockingManager.Resources>
        <SolidColorBrush x:Key="AvalonDock_Expression_BaseColor1" Color="Red"/>
        <SolidColorBrush x:Key="AvalonDock_Expression_BaseColor3" Color="Red"/>
        <SolidColorBrush x:Key="AvalonDock_Expression_BaseColor4" Color="Red"/>
        <SolidColorBrush x:Key="AvalonDock_Expression_BaseColor5" Color="Red"/>
        <SolidColorBrush x:Key="AvalonDock_Expression_BaseColor8" Color="Red"/>
        <SolidColorBrush x:Key="AvalonDock_Expression_BaseColor9" Color="Red"/>
        <SolidColorBrush x:Key="AvalonDock_Expression_BaseColor10" Color="Red"/>
        <SolidColorBrush x:Key="AvalonDock_Expression_BaseColor11" Color="Red" />
        <SolidColorBrush x:Key="AvalonDock_Expression_BaseColor13" Color="Red"/>
    </DockingManager.Resources>
    <DockingManager.Theme>
        <Vs2013DarkTheme/>
    </DockingManager.Theme>

The color doesn't change.

Also

Color accentColor = (Color)Application.Current.Resources["AColour.AccentTone1.Background.Static"];
Application.Current.Resources[AvalonDock.Themes.VS2013.Themes.ResourceKeys.ControlAccentColorKey] = accentColor;
Application.Current.Resources[AvalonDock.Themes.VS2013.Themes.ResourceKeys.ControlAccentBrushKey] = new SolidColorBrush(accentColor);

But do nothing.

Override in a resource dictionary load after the theme to insert you own color

<SolidColorBrush x:Key="{x:Static reskeys:ResourceKeys.ControlAccentBrushKey}" options:Freeze="False"  Color="{DynamicResource AccentColor}" />
<SolidColorBrush x:Key="{x:Static reskeys:ResourceKeys.Background}" options:Freeze="False"  Color="Transparent" />
<SolidColorBrush x:Key="{x:Static reskeys:ResourceKeys.PanelBorderBrush}" options:Freeze="False"  Color="{DynamicResource MainBorderColor}" />
<SolidColorBrush x:Key="{x:Static reskeys:ResourceKeys.TabBackground}" options:Freeze="False"  Color="{DynamicResource MainBackgroundColor}" />