Editar

Compartir vía


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.

protected:
 override System::Windows::Size MeasureOverride(System::Windows::Size constraint);
protected override System.Windows.Size MeasureOverride (System.Windows.Size constraint);
override this.MeasureOverride : System.Windows.Size -> System.Windows.Size
Protected Overrides Function MeasureOverride (constraint As Size) As Size

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

See also