Layout<T>.Children Layout<T>.Children Property


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

public System.Collections.Generic.IList<T> Children { get; }
member this.Children : System.Collections.Generic.IList<'T (requires 'T :> Xamarin.Forms.View)>
Property Value

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.

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

Applies to