Control.DisplayRectangle Control.DisplayRectangle Control.DisplayRectangle Control.DisplayRectangle Property


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

 virtual property System::Drawing::Rectangle DisplayRectangle { System::Drawing::Rectangle get(); };
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.


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.