ScrollableControl.DisplayRectangle ScrollableControl.DisplayRectangle ScrollableControl.DisplayRectangle ScrollableControl.DisplayRectangle Property

定义

获取表示控件的虚拟显示区域的矩形。Gets the rectangle that represents the virtual display area of the control.

public:
 virtual property System::Drawing::Rectangle DisplayRectangle { System::Drawing::Rectangle get(); };
public override System.Drawing.Rectangle DisplayRectangle { get; }
member this.DisplayRectangle : System.Drawing.Rectangle
Public Overrides ReadOnly Property DisplayRectangle As Rectangle

属性值

一个 Rectangle,它表示控件的显示区域。A Rectangle that represents the display area of the control.

注解

如果将true DisplayRectangle属性设置为, 则属性ScrollableControl为控件的虚拟大小和位置。 AutoScrollIf the AutoScroll property is set to true, the DisplayRectangle property is the virtual size and position of the ScrollableControl control. 例如, 如果的ScrollableControl宽度和高度均为100像素, 且控件包含超出其边界的控件, DisplayRectangle则表示包含控件所ScrollableControl需的大小。For example, if the width and height of the ScrollableControl are both 100 pixels and the control contains controls that extend beyond its boundaries, DisplayRectangle represents the size the ScrollableControl needs to be to include the contained controls. 同样, X的和Y属性DisplayRectangle与的滚动位置ScrollableControl相关。Similarly, the X and Y properties of DisplayRectangle are relevant to the scroll position of the ScrollableControl.

适用于

另请参阅