Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change AccentColors Vs2013DarkTheme ? #464

Closed
gaetandezeiraud opened this issue Oct 30, 2023 · 1 comment
Closed

How to change AccentColors Vs2013DarkTheme ? #464

gaetandezeiraud opened this issue Oct 30, 2023 · 1 comment

Comments

@gaetandezeiraud
Copy link

gaetandezeiraud commented Oct 30, 2023

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.

@MickaelThumerel
Copy link

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}" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants