Is there a way I can make a ListView not show its current selection I still want a user to be able to use the controls contained in that ListView via my DataTemplates, but I don't want them to know that they're actually in a ListView. Any help is greatly appreciated!

Re: Windows Presentation Foundation (WPF) ListView that doesn't show its current selection

Marlon Grech

try this

<Style TargetType="{x:Type ListViewItem}">

<Setter Property="Template">


<ControlTemplate TargetType="{x:Type ListViewItem}">

<Border Name="Bd"

Background="{TemplateBinding Background}"

BorderBrush="{TemplateBinding BorderBrush}"

BorderThickness="{TemplateBinding BorderThickness}"

Padding="{TemplateBinding Padding}">

<GridViewRowPresenter x:Name="PART_Header" />



<Trigger Property="IsEnabled" Value="false">

<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>







this will override the default style so that it does not when selected