Xamarin.Forms.Core 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.3.3.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.Layout<Xamarin.Forms.View> Xamarin.Forms.View A that positions child elements in a single line which can be oriented vertically or horizontally. Because layouts override the bounds on their child elements, application developers should not set bounds on them. The following example code, adapted from the FormsGallery example shows how to create a new with children that explore many of the layout behaviors of : XAML for Xamarin.Forms supports the following properties for the class: Property Value Orientation Horizontal or Vertical. The default is Vertical. Spacing An integer or decimal. Constructor 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.3.3.0 1.4.0.0 1.5.0.0 2.0.0.0 Initializes a new instance of the StackLayout class. The following example shows the initialization of a new StackLayout and setting its orientation and children. Method 1.3.3.0 1.4.0.0 1.5.0.0 System.Void Invalidates the layout. To be added. Method 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.3.3.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Void A value representing the x coordinate of the child region bounding box. A value representing the y coordinate of the child region bounding box. A value representing the width of the child region bounding box. A value representing the height of the child region bounding box. Positions and sizes the children of a StackLayout. Implementors wishing to change the default behavior of a StackLayout should override this method. It is suggested to still call the base method and modify its calculated results. Method 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.3.3.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.") Xamarin.Forms.SizeRequest The available width for the StackLayout to use. The available height for the StackLayout to use. This method is called during the measure pass of a layout cycle to get the desired size of the StackLayout. A which contains the desired size of the StackLayout. 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. Property 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.3.3.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.StackOrientation Gets or sets the value which indicates the direction which child elements are positioned. A which indicates the direction children layouts flow. The default value is Vertical. Setting the Orientation of a StackLayout triggers a layout cycle if the stack is already inside of a parent layout. To prevent wasted layout cycles, set the orientation prior to adding the StackLayout to a parent. Field 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.3.3.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.BindableProperty Identifies the Orientation bindable property. Property 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.3.3.0 1.4.0.0 1.5.0.0 2.0.0.0 System.Double Gets or sets a value which indicates the amount of space between each child element. A value in device pixels which indicates the amount of space between each element. The default value is 6.0. Setting this value triggers a layout cycle if the StackLayout is already in a parent Layout. The following example sets the Spacing on construction of a StackLayout. Field 1.0.0.0 1.1.0.0 1.2.0.0 1.3.0.0 1.3.3.0 1.4.0.0 1.5.0.0 2.0.0.0 Xamarin.Forms.BindableProperty Identifies the Spacing bindable property.