How do we style the PropertyGrid Category Header (GroupItem)? I would like to be able to style the Background, Border and glyphs (Up_Arrow and Down_Arrow) in the Category Header. I can style other elements (including editors etc) but I can't see a way to style the Category Header. I have tried to replace the template (starting with the template provided by the VS Edit Template/Edit Copy tool) and even though I change colors etc for what appears to be the relevant elements in the template the Category Header remains unchanged. The one exception is the Foreground color which I can change in the Category Header.
Thank you,
Scott
Comments: ** Comment from web user: BoucherS **
Thank you,
Scott
Comments: ** Comment from web user: BoucherS **
Hi,
I can see you have a style for type PropertyItem, and another one for type PropertyItemBase (which includes the Green/Red Backgrounds for the PART_NAME).
Here's a solution :
Set the Key for style of type PropertyItemBase :
```
<Style x:Key="DefaultPropertyItemBase"
TargetType="{x:Type xctk:PropertyItemBase}">
...
```
and base your style for type PropertyItem on the PropertyItemBase :
```
<Style TargetType="{x:Type xctk:PropertyItem}"
BasedOn="{StaticResource DefaultPropertyItemBase}">
...
```