How to Remove the Header From a C# WPF ListView

To remove a header from a WPF ListView, a style needs to be created targeting the GridViewColumnHeader. The style can be inserted into the controls resources:

<UserControl.Resources>
    <Style x:Key="LVStyle" TargetType="{x:Type GridViewColumnHeader}">
        <Setter Property="Visibility" Value="Collapsed" />
    </Style>
</UserControl.Resources>

Apply the style to the GridView:

<GridView ColumnHeaderContainerStyle="{StaticResource LVStyle}">
.
.
.
</GridView>

You now have a ListView control without the header.

Tags: , , , , , , ,

1 Response to "How to Remove the Header From a C# WPF ListView"

Leave a Comment