Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetPreferredSize Method

ElementHost.GetPreferredSize Method

Overrides the base class implementation GetPreferredSize to provide correct layout behavior for the hosted Windows Presentation Foundation (WPF) elements.

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

'Declaration
Public Overrides Function GetPreferredSize ( _
	proposedSize As Size _
) As Size

Parameters

proposedSize
Type: System.Drawing.Size

The custom-sized area for a WPF element.

Return Value

Type: System.Drawing.Size
The System.Drawing.Size computed by the ElementHost control, given the constraints specified by proposedSize.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft