Skip to content

Class Container

An element with children, filled with a collection initializer: new Stack { new Label("a"), new Label("b") }.

Declaration
public abstract class Container : Element

Inheritance: System.Object -> DarkEffekt.Terminal.UI.Element

Derived:
DarkEffekt.Terminal.UI.Dock, DarkEffekt.Terminal.UI.Grid, DarkEffekt.Terminal.UI.Stack

Declaration
public override int ChildCount { get; }
Declaration
public override Element GetChild(int index)

DarkEffekt.Terminal.UI.Element

Type Name
System.Int32 index
Declaration
public void Add(Element child)
Type Name
DarkEffekt.Terminal.UI.Element child
Declaration
public bool Remove(Element child)

System.Boolean

Type Name
DarkEffekt.Terminal.UI.Element child

A child left the container. A panel that keeps placement for its children drops it here.

Declaration
protected virtual void OnRemoved(Element child)
Type Name
DarkEffekt.Terminal.UI.Element child
Declaration
public void Clear()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<Element> GetEnumerator()

System.Collections.Generic.IEnumerator<DarkEffekt.Terminal.UI.Element>: An enumerator that can be used to iterate through the collection.