Events
Mar 17, 11 PM - Mar 21, 11 PM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This overview discusses the order of precedence for properties that you use to customize a column header in the GridView view mode of a ListView control.
The properties that define the content, layout, and style of a column header in a GridView are found on many related classes. Some of these properties have functionality that is similar or the same.
The rows in the following table show groups of properties that perform the same function. You can use these properties to customize the column headers in a GridView. The order of precedence for related properties is from right to left where the property in the farthest right column has the highest precedence. For example, if a ContentTemplate is set on the GridViewColumnHeader object and the HeaderTemplateSelector is set on the associated GridViewColumn, the ContentTemplate takes precedence. In this scenario, the HeaderTemplateSelector has no effect.
Related properties for column headers in a GridView
GridView | GridViewColumn | GridViewColumnHeader | |
---|---|---|---|
Context Menu Properties | ColumnHeaderContextMenu | Not applicable | ContextMenu |
ToolTip Properties |
ColumnHeaderToolTip | Not applicable | ToolTip |
Header Template Properties |
ColumnHeaderTemplate 1/ ColumnHeaderTemplateSelector |
HeaderTemplate 1/ HeaderTemplateSelector |
ContentTemplate 1/ ContentTemplateSelector |
Style Properties | ColumnHeaderContainerStyle | HeaderContainerStyle | Style |
1For Header Template Properties, if you set both the template and template selector properties, the template property takes precedence. For example, if you set both the ContentTemplate and ContentTemplateSelector properties, the ContentTemplate property takes precedence.
.NET Desktop feedback feedback
.NET Desktop feedback is an open source project. Select a link to provide feedback:
Events
Mar 17, 11 PM - Mar 21, 11 PM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Customize the presentation of Microsoft Graph Toolkit components by using templates - Training
Microsoft Graph Toolkit components are flexible for customization. You can change the presentation of Microsoft Graph Toolkit components by using templates and learn troubleshooting techniques for rendering.
Documentation
How to: Display ListView Contents by Using a GridView - WPF .NET Framework
Learn how to display ListView contents by using a GridView, by means of the included code example in XAML.
GridView Overview - WPF .NET Framework
Learn about styles and templates for the Windows Presentation Foundation ListView control. Modify the ControlTemplate to give the control a unique appearance.
How to: Style a Row in a ListView That Uses a GridView - WPF .NET Framework
Learn how to specify the style of a row in a ListView control that uses a GridView control in a Windows Presentation Foundation (WPF) application.