How to disable ListView Hover and Tile effects?

I want to turn off the Tile effect, which is some kind of pressed effect and the background color of the ListView control is hanging, how can I do this?

thank

+5
source share
2 answers

Look at this question: Disable cross-slide selection for view list

You can also make changes to the template to remove any visual states and decorations - go to the designer and right-click on your ListView / Edit Additional Templates / Edit Generated Item Container (ItemContainerStyle) / Edit a Copy ... - this will extract a template that you can modify using your preferred method.

+4

Google , ListViewItemPresenter, . ControlTemplate ListViewItem, ItemContainer ListView. - ControlTemplate:

<ListView>
<ListView.ItemContainerStyle>
    <Style TargetType="ListViewItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <ContentPresenter/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ListView.ItemContainerStyle>
<TextBlock Text="List Item" />
...
<TextBlock Text="List Item" />

: https://blog.jonstodle.com/uwp-listview-without-highlighting-and-stuff/

+3

All Articles