Table of Contents

Class Container

Namespace
Myra.Graphics2D.UI
Assembly
Myra.dll

An abstract base class for container widgets that hold multiple child widgets.

public abstract class Container : Widget, IItemWithId, INotifyAttachedPropertyChanged, IContainer
Inheritance
Container
Implements
Derived
Inherited Members

Constructors

Container()

Initializes a new instance of the Container class with stretch alignment.

public Container()

Properties

HorizontalAlignment

Gets or sets the horizontal alignment of the container. Default is Stretch.

public override HorizontalAlignment HorizontalAlignment { get; set; }

Property Value

HorizontalAlignment

VerticalAlignment

Gets or sets the vertical alignment of the container. Default is Stretch.

public override VerticalAlignment VerticalAlignment { get; set; }

Property Value

VerticalAlignment

Widgets

Gets the collection of child widgets in the container.

[Browsable(false)]
public virtual IList<Widget> Widgets { get; }

Property Value

IList<Widget>

Methods

CopyFrom(Widget)

Copies properties from another widget to this container, including all child widgets.

protected override void CopyFrom(Widget w)

Parameters

w Widget

The source widget to copy from.

InputFallsThrough(Point)

Determines whether input at the specified local position falls through the container.

public override bool InputFallsThrough(Point localPos)

Parameters

localPos Point

The local position to check.

Returns

bool

True if input falls through (when background is null); otherwise, false.