Version

ColumnHeaderBorderStyle Property

Gets/sets the border style for the column headers.
Syntax
'Declaration
 
Public Property ColumnHeaderBorderStyle As Infragistics.Win.UIElementBorderStyle
public Infragistics.Win.UIElementBorderStyle ColumnHeaderBorderStyle {get; set;}
Example
The following code sample demonstrates how to use the column header properties of the UltraListViewDetailsSettings object (which is the data type of the UltraListView's ViewSettingsDetails property):

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinListView

    Private Sub ConfigureColumnHeaders()

        Dim detailsSettings As UltraListViewDetailsSettings = Me.ultraListView1.ViewSettingsDetails

        '	Set the ThemedElementAlpha property of the ColumnHeaderAppearance
        '	to 'Transparent' so that headers are not themed
        detailsSettings.ColumnHeaderAppearance.ThemedElementAlpha = Alpha.Transparent

        '	Set the borders for the column headers to 'RaisedSoft'
        detailsSettings.ColumnHeaderBorderStyle = UIElementBorderStyle.RaisedSoft

        '	Assign an ImageList to provide the images for the column headers
        detailsSettings.ColumnHeaderImageList = Me.columnHeaderImageList

        '	St the size for the column header images to (16 X 16)
        detailsSettings.ColumnHeaderImageSize = New Size(16, 16)

        '	Use the 'Standard' HeaderStyle
        detailsSettings.ColumnHeaderStyle = HeaderStyle.Standard

        '	Don't show the sort indicators
        detailsSettings.ColumnsShowSortIndicators = False

    End Sub

    Private Sub ultraListView1_ColumnSorted(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinListView.ColumnSortedEventArgs) Handles ultraListView1.ColumnSorted

        Dim listView As UltraListView = CType(sender, UltraListView)

        '   Assign an image to represent the sorted state
        If e.Column.Sorting = Sorting.Ascending Then
            e.Column.HeaderAppearance.Image = 0
        ElseIf e.Column.Sorting = Sorting.Descending Then
            e.Column.HeaderAppearance.Image = 1
        End If


        '   Clear the image from the other columns
        If Not e.Column Is listView.MainColumn Then listView.MainColumn.HeaderAppearance.Image = Nothing

        Dim column As UltraListViewSubItemColumn = Nothing
        For Each column In listView.SubItemColumns
            If Not column Is e.Column Then column.HeaderAppearance.Image = Nothing
        Next

    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinListView;
using System.Diagnostics;

		private void ConfigureColumnHeaders()
		{
			this.ultraListView1.ImageTransparentColor = Color.Magenta;
			columnHeaderImageList = new ImageList();
			columnHeaderImageList.Images.Add( Image.FromFile("C:\\ascending.bmp") );
			columnHeaderImageList.Images.Add( Image.FromFile("C:\\descending.bmp") );

			UltraListViewDetailsSettings detailsSettings = this.ultraListView1.ViewSettingsDetails;

			//	Set the ThemedElementAlpha property of the ColumnHeaderAppearance
			//	to 'Transparent' so that headers are not themed
			detailsSettings.ColumnHeaderAppearance.ThemedElementAlpha = Alpha.Transparent;

			//	Set the borders for the column headers to 'RaisedSoft'
			detailsSettings.ColumnHeaderBorderStyle = UIElementBorderStyle.RaisedSoft;

			//	Assign an ImageList to provide the images for the column headers
			detailsSettings.ColumnHeaderImageList = this.columnHeaderImageList;

			//	St the size for the column header images to (16 X 16)
			detailsSettings.ColumnHeaderImageSize = new Size( 16, 16 );

			//	Use the 'Standard' HeaderStyle
			detailsSettings.ColumnHeaderStyle = HeaderStyle.Standard;

			//	Don't show the sort indicators
			detailsSettings.ColumnsShowSortIndicators = false;
		}

		private void ultraListView1_ColumnSorted(object sender, Infragistics.Win.UltraWinListView.ColumnSortedEventArgs e)
		{
			UltraListView listView = sender as UltraListView;

			//	Assign an image to represent the sorted state
			if ( e.Column.Sorting == Sorting.Ascending )
				e.Column.HeaderAppearance.Image = 0;
			else
			if ( e.Column.Sorting == Sorting.Descending )
				e.Column.HeaderAppearance.Image = 1;

			//	Clear the image from the other columns
			if ( e.Column != listView.MainColumn )
				listView.MainColumn.HeaderAppearance.Image = null;

			foreach( UltraListViewSubItemColumn column in listView.SubItemColumns )
			{
				if ( column != e.Column )
					column.HeaderAppearance.Image = null;
			}
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also