Change mouse-over background color?

2 posts, 0 answers
  1. Kristoffer
    Kristoffer avatar
    158 posts
    Member since:
    Dec 2012

    Posted 11 Apr 2013 Link to this post

    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?
  2. Kristoffer
    Kristoffer avatar
    158 posts
    Member since:
    Dec 2012

    Posted 11 Apr 2013 Link to this post

    I solved this by duplicating your styles. Theme support was not needed in this case.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top