This project is read-only.

Apply custom theme on DockablePane when autohidden is selected

Feb 3, 2010 at 11:28 AM


I'm new in WPF. I have this problem: i've created a new style for my application. It contains something like this:

<DockablePane Style="MyStyle">





When i apply the styles on the <DockablePane> it work well, but if i press AutoHide pin, when i go on the tab the Panel is shown, but it has the default styles. It doesn't have my custom styles :| . I hope that you can understand what i said and help me!




Feb 9, 2010 at 3:28 PM

Could you please answer to my question? At least if it is possible to do this.

Thank you!



Feb 9, 2010 at 3:54 PM

Where did you put the style?

consider that when a dockable pane is autohidden, it is placed in a different window so be sure that the resource style is reachable at application level (like in a theme resource dictionary or in the application resources)



Feb 9, 2010 at 4:06 PM

I have a resource dictionary, where is the style. i will write a part from the code:


                <ResourceDictionary Source="/ThemeLibrary;component/Themes/Theme.xaml" x:Name="theme" />

<ad:DockingManager >
        <ad:ResizingPanel Orientation="Vertical">
            <ad:ResizingPanel Orientation="Horizontal" >
                <ad:DockablePane ad:ResizingPanel.ResizeWidth="240" x:Name="dockPane" Height="Auto" Style="{DynamicResource DockablePaneStyle}">
                    <ad:DockableContent x:Name="luaViewDock"  Title="Lua scripting">
                        <controls:LuaView x:Name="luaView" />
                    <ad:DockableContent x:Name="propertyGridDock" Title="Property Grid" >
                        <wfi:WindowsFormsHost  Height="auto" Width="auto">
                            <controls:PropertyView x:Name="propertyView"></controls:PropertyView>
                    <ad:DockableContent x:Name="treeViewDock" Title="Tree View" >
                            <controls:WpfTreeView x:Name="treeView" />



</ad:DockingManager >


Feb 9, 2010 at 4:20 PM

I suppose you have the style into the ThemeLibrary;component/Themes/Theme.xaml, if so you should link this dictionary at application level, ie under Application.Resources.


Feb 10, 2010 at 12:36 PM

Yes, my style is in ThemeLibrary;component/Themes/Theme.xaml. I've tried to do your fix. It doesn't work for me. The header bar of my DockablePane is switching to the default style. DockableContent is having the custom style. Maybe there is another fix.

Thank you.


Feb 11, 2010 at 10:43 AM

I've made some short application where i tested what you said to me. And even in this application, i have the same problem. If you want i could sent this short application to you.

Thank you.


Feb 11, 2010 at 11:27 AM

Yes send me the project at adospace @

Feb 11, 2010 at 2:26 PM

After running your project I found an issue on AvalonDock that causes the problem with custom DockablePane styles. Actually it's not a real bug but instead is a missing feature.

Anyway I've corrected it and now your project works fine with my internal build 2702 that I'm going to publish.



Feb 11, 2010 at 2:31 PM


Thank you adospace. I will wait for your new build and i hope it will work.

Have a nice day.


Feb 24, 2010 at 9:59 AM

Thank you adospace. I've downloaded the new version of AvalonDock and the problem was fixed, which is great.