Alignment Property

ListView.Alignment Property

Gets or sets the alignment of items in the control.

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

Property Value

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


Exception Type 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 View.LargeIcon or View.SmallIcon.

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


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

© 2015 Microsoft