This project is read-only.

Color support

Jun 10, 2009 at 12:38 PM
Edited Jun 10, 2009 at 1:52 PM

I added color support and it's ready to use. It looks loke you see in the picture. You can change the colors by code depending on a AvalonDock theme which  you can use like:

AvalonDock.ColorFactory colorFactory = new AvalonDock.ColorFactory();
colorFactory.ChangeColors("classic", Colors.Red);

I added an aero.dummy. xaml and aero.dummy.brushes.xaml. That are copies from the aero styled ones in AvalonDock with the missing color-values from the DocumentPane border-colors. The only thing I had to change in code is in AvalonDockBrushes.cs to define the 2 missing colors (DocumentHeaderBorder, DocumentHeaderBorder2)

If you are interested you can download it from ""

Maybe there is the chance to add this class in the final version ?

Best regards,

Jun 12, 2009 at 7:46 AM

Looks nice. I like it. :)

Jun 12, 2009 at 4:55 PM


your code has been merged in AvalonDock [1.2.2252] with some modifications,

thanks a lot for your work,


Jun 12, 2009 at 8:40 PM

Hi Ado,
I have to thank you for your very well working control.

Before I used DevComponents Docking library. But there isn't WinForms support implemented.



Jun 17, 2009 at 12:04 PM
Edited Jun 17, 2009 at 12:04 PM

Hi Ado,
There must be a change in ColorFactory.cs. It should be:

        public static void ChangeColors(string baseTheme, Color color)
            ResourceDictionary rd = new ResourceDictionary();
            rd.Source = new Uri("/AvalonDock;component/themes/" + baseTheme + ".xaml", UriKind.RelativeOrAbsolute);

            ChangeKeysInResourceDictionary(rd, color);
            foreach (ResourceDictionary rd2 in rd.MergedDictionaries)
                ChangeKeysInResourceDictionary(rd2, color);

            // first search and remove old one
            foreach (ResourceDictionary res in Application.Current.Resources.MergedDictionaries)
                if (res.Source != null)
                    string source = res.Source.ToString();
                    if (source.Contains("/AvalonDock;component/themes/"))

I have a project with a ResourceDictionary with Source = null.




Aug 27, 2009 at 4:01 PM



The class ColorFactory is not on the last "source code" version of Avalon ? It is no more supported ?




Aug 27, 2009 at 4:39 PM

It's still in.
It's in ColorFactory.cs.