This is a migrated thread and some comments may be shown as answers.

Change mouse-over background color?

1 Answer 238 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Kristoffer
Top achievements
Rank 1
Kristoffer asked on 11 Apr 2013, 08:37 AM
When hovering property grid items, the background changes to whatever the theme uses as background. I believe this is caused by the MouseOver stuff in PropertyGridFieldTemplate:

<Rectangle x:Name="Background_Over"  Grid.ColumnSpan="2"  Fill="{telerik:Windows8TouchResource ResourceKey=MainForegroundBrush}" Opacity="0.05" HorizontalAlignment="Stretch" Visibility="{Binding IsMouseOver, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Stretch"/>

Is it possible to change this style for my property grid? Our application allows for switching between themes, so it makes sense to base the styles on the current style of the desired type (i.e. BasedOn). Not sure if this is possible if we need to change the entire style.

So, two questions:
1) How do we change the hovering color? (I.e. on mouse over, we want to use the background color of the property grid. Maybe darkening it a bit.)
2) How do we remove the gray area to the left?

1 Answer, 1 is accepted

Sort by
0
Kristoffer
Top achievements
Rank 1
answered on 11 Apr 2013, 11:18 AM
I solved this by duplicating your styles. Theme support was not needed in this case.
Tags
PropertyGrid
Asked by
Kristoffer
Top achievements
Rank 1
Answers by
Kristoffer
Top achievements
Rank 1
Share this question
or