Interface IContainer
A simple container for controls.
Inherited Members
Namespace: SadConsole.UI.Controls
Assembly: SadConsole.dll
Syntax
public interface IContainer : IList<ControlBase>, ICollection<ControlBase>, IEnumerable<ControlBase>, IEnumerable
Properties
AbsolutePosition
Gets the position of the container based on any parents position.
Declaration
Point AbsolutePosition { get; }
Property Value
| Type | Description |
|---|---|
| Point |
Host
The host owning this container.
Declaration
ControlHost? Host { get; }
Property Value
| Type | Description |
|---|---|
| ControlHost |
this[string]
Gets a control by its Name property.
Declaration
ControlBase this[string name] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the control. |
Property Value
| Type | Description |
|---|---|
| ControlBase | The control. |
Methods
GetNamedControl(string)
Gets a control by its Name property.
Declaration
ControlBase GetNamedControl(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the control. |
Returns
| Type | Description |
|---|---|
| ControlBase | The control. |
HasNamedControl(string)
Checks whether or not the container has a control registered with the given name.
Declaration
bool HasNamedControl(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name to check. |
Returns
| Type | Description |
|---|---|
| bool |
HasNamedControl(string, out ControlBase?)
Checks whether or not the container has a control registered with the given name. If found, the instance is assigned to the control parameter.
Declaration
bool HasNamedControl(string name, out ControlBase? control)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name to check. |
| ControlBase | control | The control instance found. |
Returns
| Type | Description |
|---|---|
| bool |