Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: Change background colour of PropertyGrid in CollectionEditor

$
0
0
Is it possible to change the colours of the first column in the PropertyGrid component of a CollectionEditor. I can change colours of those in the second column (red in the picture) and other items in the PropertyGrid, e.g. pink text, blue background using the following code

Image
<Style TargetType="{x:Type xctk:PropertyGrid}">
        <Style.Resources>
            <Style TargetType="TextBlock">
                <Setter Property="Foreground" Value="Pink"/>
            </Style>
            <Style TargetType="Grid">
                <Setter Property="Background" Value="Blue"/>
            </Style>
            <Style TargetType="Expander">
                <Setter Property="Background" Value="Brown"/>
                <Setter Property="Foreground" Value="Brown"/>
            </Style>
        </Style.Resources>
            <Setter Property="Background" Value="{DynamicResource NormalBorderBrush}"/>

    </Style>
Note that the Expander Brown colours are not doing anything.
I have a global style which changes TextBlock ForeGround to white, but this means I cannot see the text in the first column - hence the need to change colours in this column.

Any help much appreciated.

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>