Editar

Compartilhar via


ListViewItem.Bounds Property

Definition

Gets the bounding rectangle of the item, including subitems.

public:
 property System::Drawing::Rectangle Bounds { System::Drawing::Rectangle get(); };
[System.ComponentModel.Browsable(false)]
public System.Drawing.Rectangle Bounds { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Bounds : System.Drawing.Rectangle
Public ReadOnly Property Bounds As Rectangle

Property Value

A Rectangle that represents the bounding rectangle of the item.

Attributes

Remarks

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.

Applies to

See also