VisualElement.Measure(Double, Double, MeasureFlags) VisualElement.Measure(Double, Double, MeasureFlags) Method

Definition

Returns the minimum size that a visual element needs in order to be displayed on the device.

public Xamarin.Forms.SizeRequest Measure (double widthConstraint, double heightConstraint, Xamarin.Forms.MeasureFlags flags = Xamarin.Forms.MeasureFlags.None);
member this.Measure : double * double * Xamarin.Forms.MeasureFlags -> Xamarin.Forms.SizeRequest
Parameters
widthConstraint
Double Double

The suggested maximum width constraint for the visual element to render.

heightConstraint
Double Double

The suggested maximum height constraint for the visual element to render.

flags
MeasureFlags MeasureFlags

A value that controls whether margins are included in the returned size.

Returns

The minimum size that a visual element needs in order to be displayed on the device.

Remarks

If the minimum sized that the visual element needs in order to be displayed on the device is larger than can be accommodated by widthConstraint and heightConstraint, the return value may represent a rectangle that is larger in either or both of those parameters.

Applies to