Control.DisplayRectangle 屬性

定義

取得表示控制項顯示區域的矩形。Gets the rectangle that represents the display area of the control.

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

屬性值

表示控制項顯示區的 RectangleA Rectangle that represents the display area of the control.

實作

System.Windows.Forms.Layout.IArrangedElement.DisplayRectangle
屬性

備註

DisplayRectangle 屬性會傳回控制項顯示區域的用戶端矩形。The DisplayRectangle property returns the client rectangle of the display area of the control. 對於基底控制項類別,這等於用戶端矩形。For the base control class, this is equal to the client rectangle. 不過,如果用戶端的工作區與顯示區域不同,則繼承控制項可能會想要變更。However, inheriting controls might want to change this if their client area differs from their display area. 顯示矩形是包圍控制項的最小 Rectangle,用於配置控制項。The display rectangle is the smallest Rectangle that encloses a control and is used to lay out controls.

給繼承者的注意事項

覆寫衍生類別中的 DisplayRectangle 屬性時,請使用基類的 DisplayRectangle 屬性來擴充基底的執行。When overriding the DisplayRectangle property in a derived class, use the base class's DisplayRectangle property to extend the base implementation. 或者,您必須提供所有的實作為。Alternatively, you must provide all the implementation.

適用於

另請參閱