ElementHost::GetPreferredSize Method (Size)

 

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:
virtual Size GetPreferredSize(
	Size proposedSize
) override

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: