Xamarin.Forms Guides | Samples

Xamarin.Forms.Layout<T>.Children Property

Gets an IList<View> of child element of the Layout.


public IList<T> Children { get; }


A IList<View>. The default is an empty list.


The Children collection of a Layout contains all the children added throught the public add/remove interface. Internal children will not be exposed through this collection.

The following shows the creation of a layout, setting a property, and adding the children in the object initializer.

C# Example

  var stack = new StackLayout {
    Spacing = 20,
    Children = {
      new Label {Text = "Hello World!"},
      new Button {Text = "Click Me!"}


Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions:,,,,,,