WindowsFormsHost.ScaleChild(Vector) WindowsFormsHost.ScaleChild(Vector) WindowsFormsHost.ScaleChild(Vector) WindowsFormsHost.ScaleChild(Vector) Method

定義

縮放裝載的 Windows Forms 控制項,並且追蹤比例因素。Scales the hosted Windows Forms control, and tracks the scale factor.

protected:
 virtual System::Windows::Vector ScaleChild(System::Windows::Vector newScale);
protected virtual System.Windows.Vector ScaleChild (System.Windows.Vector newScale);
abstract member ScaleChild : System.Windows.Vector -> System.Windows.Vector
override this.ScaleChild : System.Windows.Vector -> System.Windows.Vector
Protected Overridable Function ScaleChild (newScale As Vector) As Vector

參數

newScale
Vector Vector Vector Vector

新的縮放因數。The new scale factor.

傳回

Vector,代表套用到裝載之 Windows Forms 控制項的比例因素。A Vector which represents the scale factor applied to the hosted Windows Forms control.

備註

Windows Forms 控制項不支援以 WPF 元素相同的方式進行縮放。Windows Forms controls do not support scaling in the same way as WPF elements. 例如, 將 Windows Forms 控制項從1的因數調整為 0.5, 然後回到1的因數, 而不是通常會復原控制項的原始大小。For example, scaling a Windows Forms control from a factor of 1 to a factor of 0.5 and back to a factor of 1 does not, in general, recover the original size of the control. 如需詳細資訊,請參閱 WindowsFormsHost 元素的配置考量For more information, see Layout Considerations for the WindowsFormsHost Element.

覆寫ScaleChild方法, 為主控的 Windows Forms 控制項提供自訂調整行為。Override the ScaleChild method to provide custom scaling behavior for the hosted Windows Forms control.

適用於