dimanche 10 mai 2015

Select ListView item on hover [duplicate]

This question already has an answer here:

I have found a solution at link. The problem is then mouse leaving the item it become unselected but I need to make item stay selected. How to solve it? Here is the code from link:

<ListBox>
    <ListBox.ItemContainerStyle>
        <Style TargetType="ListBoxItem">
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="IsSelected" Value="True"/>
                </Trigger>
            </Style.Triggers>
        </Style>
    </ListBox.ItemContainerStyle>
</ListBox>

Aucun commentaire:

Enregistrer un commentaire