Provides data for the ListView.DrawColumnHeader event.
See Also: DrawListViewColumnHeaderEventArgs Members
The ListView.DrawColumnHeader event lets you customize (or owner-draw) the appearance of a System.Windows.Forms.ListView control in the details view.
The ListView.DrawColumnHeader event is raised by a System.Windows.Forms.ListView control when its ListView.OwnerDraw property is set to true and its ListView.View property is set to View.Details. The System.Windows.Forms.DrawListViewColumnHeaderEventArgs passed to the event handler contains information about the System.Windows.Forms.ColumnHeader to draw and also provides methods to help you draw the header.
Use the DrawListViewColumnHeaderEventArgs.Header property to retrieve information about the column header to draw. Use the DrawListViewColumnHeaderEventArgs.Graphics property to do the actual drawing within the area specified by the DrawListViewColumnHeaderEventArgs.Bounds property. To draw standard System.Windows.Forms.ListView elements that do not need customization, use the DrawListViewColumnHeaderEventArgs.DrawBackground and erload:System.Windows.Forms.DrawListViewColumnHeaderEventArgs.DrawText methods.
Use the DrawListViewColumnHeaderEventArgs.DrawDefault property when you want the operating system to draw the subitem. This is useful when you want to customize only specific headers.
To avoid issues with graphics flickering when owner drawing, override the System.Windows.Forms.ListView control and set the ListView.DoubleBuffered property to true. This feature is available only on Windows XP and the Windows Server 2003 family when your application calls the Application.EnableVisualStyles method.