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

定义

获取表示控件的显示区域的矩形。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

属性值

一个 Rectangle,它表示控件的显示区域。A 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.

适用于

另请参阅