ListView.Alignment Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the alignment of items in the control.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public ListViewAlignment Alignment { get; set; }

Property Value

Type: System.Windows.Forms.ListViewAlignment

One of the ListViewAlignment values. The default is Top.

Exception Condition
InvalidEnumArgumentException

The value specified is not one of the ListViewAlignment values.

The Alignment property only affects alignment when the View property is set to LargeIcon or SmallIcon.

System_CAPS_noteNote

This property has no effect with the View property is set to List.

.NET Framework
Available since 1.1
Return to top
Show: