ListViewItem::IndentCount Property

 

Gets or sets the number of small image widths by which to indent the ListViewItem.

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

public:
property int IndentCount {
	int get();
	void set(int value);
}

Property Value

Type: System::Int32

The 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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: