I'm working on a project in which I am trying to make all the windows dockable. I have had success doing this but am having one small problem. I have the theme set at Expression_Dark for everything and when I undock one of the windows everything is fine, but when I dock it back anywhere on the screen the theme is broken on that specific pane and the color changes back to default. How can I fix this problem and reset the theme. I was going to invoke the panestatechange event and reset the theme from there but cant figure out the correct code to put within the event. My code for the xaml is posted below...any help would be appreciated. Thanks.