0

I have implemented a ItemsView according to the descriptions in the WinUI 3 Gallery app.

How do I disable the hover effect that occurs when mouse over each item (item becomes darker)?

Thanks

1 Answer 1

1

ItemsView uses ItemContainer for each item. Overriding ItemContainerPointerOverBackground should work:

<ItemsView ItemsSource="{x:Bind Items}">
    <ItemsView.Resources>
        <SolidColorBrush
            x:Key="ItemContainerPointerOverBackground"
            Color="Transparent" />
    </ItemsView.Resources>
</ItemsView>

You can learn more about it in the generic.xaml.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for a quick answer! How/Where does one find these keys?
You can find them in the generic.xaml. Search for ItemContainerPointerOverBackground.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.