0

I have a Extended Wpf Toolkit propertyGrid:

<wpg:PropertyGrid x:Name="pg" Width="450" Height="300" Margin="10" ShowSearchBox="False"  Background="Transparent" >

and here is what it looks like:

enter image description here

So it's pretty clear that the background doesn't entails the rows which are therefore independent.

That said I have seen that by adding

<wpg:PropertyGrid.Resources>
            <SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="Red" />
        </wpg:PropertyGrid.Resources>

I am able to change some of the lines (not all) but I need to do that programmatically through code-behind.

This is what I'd like to achieve:

enter image description here

Thanx

Luca
  • 918
  • 2
  • 13
  • 30

1 Answers1

0

Styling the WPF PropertyGrid has an example at:

https://gist.github.com/Tide

Save the PropertyGrid.xaml to your project, and in App.xaml add

        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="PropertyGrid.xaml" />
        </ResourceDictionary.MergedDictionaries>

inside:

    <ResourceDictionary>

    </ResourceDictionary>

Probably the best approach is using a Theme as shown on the old CodePlex site:

https://wpfpropertygrid.codeplex.com

Wayne
  • 82
  • 4