I have build a number of pane header presenters to change the color of the content pane header. However, I could not find a property to attach the pane header presenter to a content pane. The only place I could find it was in the DockManger class.
Does this mean I can only change the background/foreground color of all the content panes? I would really like to change the backgroundforeground color of each content pane header individually based upon the content in the the pane.
You could put your style or brush resources for the PaneHeaderPresenter in the Resources of the individual ContentPane instances.
I'm not clear how to do this. I am in C# code and I get an event from the ContentPane Control. I then get the ContentPane and I have the PaneHeaderPresenter I want to apply to the content pane. What I can't figure out is how to connect the two in c# code.
It is basically what I said - you would be manipulating the Resources of the ContentPane. So if you're changing the Style for the PaneHeaderPresenter it would be something like cp.Resources[typeof(PaneHeaderPresenter)] = myStyle;
Another way to approach this is to define you're own attached property, set the attached property on the contentpane to indicate its current state and then have 1 PaneHeaderPresenter style that has style/template trigger based on this property of the php's Pane and changes the background,etc.
Thanks, that did the trick. I was not aware of that function. It open up all kinds of styling options.