Export (0) Print
Expand All

ListView.Alignment Property

Gets or sets the alignment of items in the control.

[Visual Basic]
Public Property Alignment As ListViewAlignment
[C#]
public ListViewAlignment Alignment {get; set;}
[C++]
public: __property ListViewAlignment get_Alignment();
public: __property void set_Alignment(ListViewAlignment);
[JScript]
public function get Alignment() : ListViewAlignment;
public function set Alignment(ListViewAlignment);

Property Value

One of the ListViewAlignment values. The default is ListViewAlignment.Top.

Exceptions

Exception Type Condition
InvalidEnumArgumentException The value specified is not one of the ListViewAlignment values.

Remarks

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

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

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ListView Class | ListView Members | System.Windows.Forms Namespace | ListViewAlignment

Show:
© 2015 Microsoft