Maybe I am just missing it, but I cant seem to change the background of the docked pane header. I can change the foreground and the content pane, but the header background remains grey.
Can someone lead me to how the header background can be changed....XAML or in code doest matter, or maybe a link to an example.
Thanks
SDI
Foreground is an inherited property in WPF so changing that will affect an element and its descendants (unless its set explicitly on the descendants). Background is not an inherited property so setting this on an element (e.g. ContentPane) will affect just the element within its ControlTemplate that is bound to that property. The header area is a separate element - PaneHeaderPresenter - that is within the ContentPane's template and it has its own style. If you want to affect the header then you would either restyle the PaneHeaderPresenter (i.e. put a Style into the ContentPane's Resources that targets the PHP and has a custom Template or has setters for the background for the PHP) or you can look at the default xaml we provide (included in the DefaultStyles directory) and see what brushes are being used to provide the background and then put brushes with those ResourceKeys as the key for the brush into the ContentPane's Resources.
Can you show this in code - VB or C# no matter? BTW, are there more projects for WPF that contain examples. I have only 2 that I can find - xamFeatureBrowser and xamShowcase. Like yo did for the .Net 2008 volume release? Or is there a link to examples of the controls using code on the website?
Thanks for your time
SharpDataInc said:Can you show this in code - VB or C# no matter?
I'm not sure what you are looking for a sample of. If you mean setting the Background of an element you would create a style and put it in the resources of the element you want to affect. e.g.
Note none of this syntax is specific to our controls but is general wpf code. The only thing really specific to our stuff here is the specific properties that are being triggered off of.
I'm assuming you're not trying to get to the element itself that exists within the template and change it in code. You don't normally want to do that in WPF because if the template changes (e.g. if the implicit style change, if the os theme changes, etc.) then you'll "lose" any changes you made. The normal WPF way to affect visual is to set Style properties or put Styles into the resources of an element and control the look there. e.g. the above would be:
SharpDataInc said:BTW, are there more projects for WPF that contain examples. I have only 2 that I can find - xamFeatureBrowser and xamShowcase. Like yo did for the .Net 2008 volume release? Or is there a link to examples of the controls using code on the website?
Ah, okay thanks for the info. I am going to have the user be able to switch between different themes, specific to our application, and therefore the code would be put into play. But in reality, now I should just use different theme XAML files, as I see in your DefaultStyles folder. I see now that your controls have the same coding as WPF, which makes this easier.
Thanks for the help!