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

SizeF,包含水平和垂直縮放比例。A SizeF containing the horizontal and vertical scaling factors.

備註

Scale 方法會根據指定的縮放比例來調整控制項 factorThe Scale method scales the control by the specified scaling factor. 如果 ScaleChildren 屬性是 true,它也會以遞迴方式調整所有子控制項。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.

屬性

適用於