WindowsFormsHost.MeasureOverride(Size) Method

Definition

Overrides the base class implementation of MeasureOverride(Size) to measure the size of a WindowsFormsHost object and return proper sizes to the layout engine.

C#
protected override System.Windows.Size MeasureOverride(System.Windows.Size constraint);

Parameters

constraint
Size

The available size for the WindowsFormsHost object.

Returns

The desired size of the WindowsFormsHost object.

Remarks

Size constraints in WPF layout are hard constraints. If the constraints are exceeded, the host must clip the content within the hosted region. The implementation of this method enforces this behavior.

Applies to

Продукт Версії
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also