ListViewItem::IndentCount Property
.NET Framework (current version)
Gets or sets the number of small image widths by which to indent the ListViewItem.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Property Value
Type: System::Int32The number of small image widths by which to indent the ListViewItem.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | When setting IndentCount, the number specified is less than 0. |
The IndentCount property can be used only when the View property of the containing ListView is set to Details, and the SmallImageList property of the ListView is set.
The following code example demonstrates how to set the IndentCount property. To run this example, paste the following code into a Windows Form and call the InitializeIndentedListViewItems method from the form's constructor or Load event-handling method.
.NET Framework
Available since 2.0
Available since 2.0
Show: