Export (0) Print
Expand All

ListViewItem.Bounds Property

Gets the bounding rectangle of the item, including subitems.

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

[BrowsableAttribute(false)]
public Rectangle Bounds { get; }

Property Value

Type: System.Drawing.Rectangle
A Rectangle that represents the bounding rectangle of the item.

You can use this method to obtain the bounding rectangle of an entire item. If you want to obtain the bounding rectangle for a portion of the entire item, use the GetBounds method. The ListView class provides a GetItemRect method that allows you to get the bounding rectangle of any item located within the control.

The returned bounding rectangle uses client control coordinates that are relative to the top-left corner of the currently visible area of the containing ListBox. If the ListBox is scrollable and positioned so that the ListViewItem is not visible, the coordinates returned may be negative.

When the ListView.View property has a value of List, the width of the bounding rectangle is the width of the column containing the item, not the width of the text in the item. If the ListView.Columns collection does not contain any columns, the default column width of 60 pixels is used.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft