Xamarin.Forms.ContentView.OnSizeRequest Method
This method is called during the measure pass of a layout cycle to get the desired size of the ContentView.

Syntax

protected override SizeRequest OnSizeRequest (double widthConstraint, double heightConstraint)

Parameters

widthConstraint
The available width for the ContentView to use
heightConstraint
The available height for the ContentView to use.

Returns

A Xamarin.Forms.SizeRequest which contains the desired size of the StackLayout.

Remarks

The results of this method will be the desired size of its content.

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.2.0.0, 1.3.0.0