StackLayout.OnSizeRequest(Double, Double) Method

Definition

Caution

OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.

This method is called during the measure pass of a layout cycle to get the desired size of the StackLayout.

[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")]
protected override Xamarin.Forms.SizeRequest OnSizeRequest (double widthConstraint, double heightConstraint);
override this.OnSizeRequest : double * double -> Xamarin.Forms.SizeRequest

Parameters

widthConstraint
Double

The available width for the StackLayout to use.

heightConstraint
Double

The available height for the StackLayout to use.

Returns

A SizeRequest which contains the desired size of the StackLayout.

Attributes

Remarks

The results of this method will be a sum of all the desired sizes of its children along the orientation axis, and the maximum along the non-orientation axis.

Applies to