I am using the Extended WPF Toolkit Community Edition v2.6 from NuGet in my project, but I don't know if there is something more I should be doing to allow me to theme or customize a control template.
After asking Designer/Blend to create a Copy of the Existing default Template for the PropertyGrid control, the UI is broken. The Template looks correct but no longer functions at Design-Time or Run-Time.
After choosing to copy the default template into a new a Style:
Is there an easy way to edit the built-in styles for this control? I am really just trying to override the foreground/background colors of the Editors/Labels of the PropertyGrid.
I've tried some manual poking in the XAML with limited success:
<Style TargetType="{x:Type xctk:DropDownButton}">
<Setter Property="Background" Value="Black"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<Style TargetType="{x:Type xctk:CustomPropertyItem}">
<Setter Property="Background" Value="Black"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<Style TargetType="{x:Type xctk:PropertyGridEditorCollectionControl}">
<Setter Property="Background" Value="Black"/>
<Setter Property="Foreground" Value="White"/>
</Style>
When trying to create a Property Container style, by copying the default, I get the "Copy Style failed." error from within the VS Designer or Blend.
Results in this:
I have tried manually including the generic.xaml from the Xceed Toolkit assembly but it hasn't fixed the problem.
I tried two ways of referencing the resource:
<ResourceDictionary Source="/Xceed.Wpf.Toolkit;component/themes/generic.xaml" />
<ResourceDictionary Source="pack://application:,,,/Xceed.Wpf.Toolkit;component/Themes/generic.xaml">
Here is the stack trace from the Designer when I try to set the PropertyContainerStyle:
PropertyGrid
. I can share generated templates if you need. – Lactam