DataGridViewCell.ContentBounds 屬性

定義

取得圍住儲存格內容區域的周框。

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

屬性值

圍繞儲存格內容的 Rectangle

屬性

例外狀況

包含儲存格的資料列是共用的資料列。

-或-

儲存格是資料行行首儲存格。

ColumnIndex 屬性的值小於 0,表示儲存格是資料列行首儲存格。

備註

傳回的矩形會報告用戶端座標,以圖元為單位。

這個屬性會 GetContentBounds 呼叫 方法來取得其值。 針對基底 DataGridViewCell 類型,這個值為 Empty

若要取得儲存格的周框,而不是儲存格內容,請使用 DataGridView.GetCellDisplayRectangle 方法。

適用於

另請參閱