Control.Scale 方法

定义

缩放控件和任何子控件。Scales the control and any child controls.

重载

Scale(SizeF)

按指定的比例因子缩放控件和所有子控件。Scales the control and all child controls by the specified scaling factor.

Scale(Single)

缩放控件和任何子控件。Scales the control and any child controls.

Scale(Single, Single)

缩放整个控件和任何子控件。Scales the entire control and any child controls.

Scale(SizeF)

按指定的比例因子缩放控件和所有子控件。Scales the control and all child controls by the specified scaling factor.

public:
 void Scale(System::Drawing::SizeF factor);
public void Scale (System.Drawing.SizeF factor);
member this.Scale : System.Drawing.SizeF -> unit
Public Sub Scale (factor As SizeF)

参数

factor
SizeF

一个包含水平和垂直比例因子的 SizeFA SizeF containing the horizontal and vertical scaling factors.

注解

Scale 方法按指定缩放 factor缩放控件。The Scale method scales the control by the specified scaling factor. 如果 trueScaleChildren 属性,它还会以递归方式缩放所有子控件。It also recursively scales all child controls if the ScaleChildren property is true. 此方法在内部调用 ScaleControl 来缩放每个控件。Internally, this method calls ScaleControl to scale each control.

另请参阅

Scale(Single)

警告

此 API 现已过时。

缩放控件和任何子控件。Scales the control and any child controls.

public:
 void Scale(float ratio);
[System.Obsolete("This method has been deprecated. Use the Scale(SizeF ratio) method instead. https://go.microsoft.com/fwlink/?linkid=14202")]
public void Scale (float ratio);
member this.Scale : single -> unit
Public Sub Scale (ratio As Single)

参数

ratio
Single

要用于缩放的比例。The ratio to use for scaling.

属性

Scale(Single, Single)

警告

此 API 现已过时。

缩放整个控件和任何子控件。Scales the entire control and any child controls.

public:
 void Scale(float dx, float dy);
[System.Obsolete("This method has been deprecated. Use the Scale(SizeF ratio) method instead. https://go.microsoft.com/fwlink/?linkid=14202")]
public void Scale (float dx, float dy);
member this.Scale : single * single -> unit
Public Sub Scale (dx As Single, dy As Single)

参数

dx
Single

水平比例因子。The horizontal scaling factor.

dy
Single

垂直比例因子。The vertical scaling factor.

属性

适用于