Control.Scale 方法

定义

缩放控件和任何子控件。

重载

Scale(SizeF)

按指定的比例因子缩放控件和所有子控件。

Scale(Single)
已过时。
已过时。

缩放控件和任何子控件。

Scale(Single, Single)
已过时。
已过时。

缩放整个控件和任何子控件。

Scale(SizeF)

按指定的比例因子缩放控件和所有子控件。

C#
public void Scale (System.Drawing.SizeF factor);

参数

factor
SizeF

一个包含水平和垂直比例因子的 SizeF

注解

该方法 Scale 通过指定的缩放 factor来缩放控件。 如果 ScaleChildren 属性为 true,它还递归缩放所有子控件。 在内部,此方法调用 ScaleControl 缩放每个控件。

另请参阅

适用于

.NET Framework 4.8 和其他版本
产品 版本
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
Windows Desktop 3.0, 3.1, 5, 6, 7

Scale(Single)

注意

This method has been deprecated. Use the Scale(SizeF ratio) method instead. http://go.microsoft.com/fwlink/?linkid=14202

注意

This method has been deprecated. Use the Scale(SizeF ratio) method instead. https://go.microsoft.com/fwlink/?linkid=14202

缩放控件和任何子控件。

C#
public void Scale (float ratio);
C#
[System.Obsolete("This method has been deprecated. Use the Scale(SizeF ratio) method instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public void Scale (float ratio);
C#
[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);

参数

ratio
Single

要用于缩放的比例。

属性

适用于

.NET Framework 4.8 和其他版本
产品 版本 (已过时)
.NET Framework 1.1 (2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8)
Windows Desktop (3.0, 3.1, 5, 6, 7)

Scale(Single, Single)

注意

This method has been deprecated. Use the Scale(SizeF ratio) method instead. http://go.microsoft.com/fwlink/?linkid=14202

注意

This method has been deprecated. Use the Scale(SizeF ratio) method instead. https://go.microsoft.com/fwlink/?linkid=14202

缩放整个控件和任何子控件。

C#
public void Scale (float dx, float dy);
C#
[System.Obsolete("This method has been deprecated. Use the Scale(SizeF ratio) method instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public void Scale (float dx, float dy);
C#
[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);

参数

dx
Single

水平比例因子。

dy
Single

垂直比例因子。

属性

适用于

.NET Framework 4.8 和其他版本
产品 版本 (已过时)
.NET Framework 1.1 (2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8)
Windows Desktop (3.0, 3.1, 5, 6, 7)