Skip to content

IContainer Interface

A simple container for controls.

C#
public interface IContainer : IList<ControlBase>, ICollection<ControlBase>, IEnumerable<ControlBase>, IEnumerable

Gets the position of the container based on any parents position.

C#
Point AbsolutePosition { get; }

The host owning this container.

C#
ControlHost? Host { get; }

Gets a control by its Name property.

C#
ControlBase this[string name] { get; }

Checks whether or not the container has a control registered with the given name.

C#
bool HasNamedControl(string name)

name string
The name to check.

bool
true when the control is found; otherwise false.

Checks whether or not the container has a control registered with the given name. If found, the instance is assigned to the control parameter.

C#
bool HasNamedControl(string name, out ControlBase? control)

name string
The name to check.

control ControlBase
The control instance found.

bool
true when the control is found; otherwise false.

Gets a control by its Name property.

C#
ControlBase GetNamedControl(string name)

name string
The name of the control.

ControlBase
The control.