Export (0) Print
Expand All

WindowsFormsHost.ScaleChild Method

Scales the hosted Windows Forms control, and tracks the scale factor.

Namespace: System.Windows.Forms.Integration
Assembly: WindowsFormsIntegration (in windowsformsintegration.dll)

'Declaration
Protected Overridable Function ScaleChild ( _
	newScale As Vector _
) As Vector
'Usage
Dim newScale As Vector
Dim returnValue As Vector

returnValue = Me.ScaleChild(newScale)
protected Vector ScaleChild (
	Vector newScale
)
protected function ScaleChild (
	newScale : Vector
) : Vector
Not applicable.

Parameters

newScale

The new scale factor.

Return Value

A Vector which represents the scale factor applied to the hosted Windows Forms control.

Windows Forms controls do not support scaling in the same way as WPF elements. 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. For more information, see Layout Considerations for the WindowsFormsHost Element.

Override the ScaleChild method to provide custom scaling behavior for the hosted Windows Forms control.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft