Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Bounds Property

ListViewItem.Bounds Property

Updated: August 2008

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.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

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

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

Date

History

Reason

August 2008

Added text to Remarks section about control coordinates.

Information enhancement.

Community Additions

ADD
Show:
© 2015 Microsoft