ElementHost.GetPreferredSize Method (Size)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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)

public override Size GetPreferredSize(
	Size proposedSize
)

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
Available since 3.0
Return to top
Show: