Export (0) Print
Expand All

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)

abstract GetPreferredSize : 
        proposedSize:Size -> Size  
override GetPreferredSize : 
        proposedSize:Size -> Size


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
© 2015 Microsoft