Showing posts with label WPF Listview. Show all posts
Showing posts with label WPF Listview. Show all posts

Tuesday, June 30, 2009

WPF : Hide Headers from a GridviewColumn

Hi,

I know, this is simple but I wasted a bunch of my valuable time in finding a solution while developing my first application in WPF. Include the following line in your < listview> block to get rid of headers in your gridview column.

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

Thanks,
Vikas