views:

13

answers:

1

I have a listbox with a ItemTemplate which defines a Grid. The grid has a style which sets the background and foreground based on data bindings.

    <Style x:Key="GridStyle1" TargetType="{x:Type Grid}">
        <Style.Triggers>
            <DataTrigger Binding="{Binding StoryType}" Value="Release">
                <Setter Property="Background" Value="#407AA5"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding StoryType}" Value="Chore">
                <Setter Property="Background" Value="#E7F3FA"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding StoryType}" Value="Feature">
                <Setter Property="Background" Value="#E7F3FA"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

I want to change the background to a brush on MouseOver but only on items where StoryType equals "Feature". Which approach should I use?

+1  A: 

check this

Veer