Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1155
Modifying the Default Grid Label Background Color
posted

I have successfully modified every action of the LabelPresenter. What I have not been able to do is to modfiy the default background color when simply the mouse is over the grid label. Sorry, IsMouseOver does not work. I have tried all of the below. Image attached. The default appears as an pale Blue color. I would like to change that.

Thanks in advance.

Glenn

 

 

<Style.Triggers>

 

 

<Trigger Property="SortStatus" Value="Ascending">

 

 

<Setter Property="Background" Value="Orange"/>

 

 

<Setter Property="Foreground" Value="Black" />

 

 

</Trigger>

 

 

<Trigger Property="SortStatus" Value="Descending">

 

 

<Setter Property="Background" Value="Yellow"/>

 

 

<Setter Property="Foreground" Value="Black" />

 

 

</Trigger>

 

 

<MultiTrigger>

 

 

<MultiTrigger.Conditions>

 

 

<Condition Property="IsMouseCaptured" Value="True" />

 

 

<Condition Property="IsMouseDirectlyOver" Value="True" />

 

 

<Condition Property="IsMouseOver" Value="True" />

 

 

<Condition Property="Selector.IsSelected" Value="True" />

 

 

<Condition Property="IsFocused" Value="True" />

 

 

</MultiTrigger.Conditions>

 

 

<Setter Property="Background" Value="{DynamicResource MOINormalBackgroundBrush}" />

 

 

</MultiTrigger>

 

 

</Style.Triggers>

Parents
No Data
Reply
  • 745
    Verified Answer
    posted

    The background of the cell is binded to the LabelHighlight property of the LabelPresenter.. not Background.  It should work if you use LabelHighlight instead of Background.

Children