Interface IContainer
- Namespace
- SharpConsoleUI.Controls
- Assembly
- SharpConsoleUI.dll
Represents a container that can host window controls and provides shared properties for rendering.
public interface IContainer
- Extension Methods
Properties
BackgroundColor
Gets or sets the background color for the container and its child controls.
Color BackgroundColor { get; set; }
Property Value
ForegroundColor
Gets or sets the foreground (text) color for the container and its child controls.
Color ForegroundColor { get; set; }
Property Value
GetConsoleWindowSystem
Gets the console window system instance, or null if not attached to a window system.
ConsoleWindowSystem? GetConsoleWindowSystem { get; }
Property Value
IsDirty
Gets or sets whether this container needs to be redrawn.
bool IsDirty { get; set; }
Property Value
Methods
GetVisibleHeightForControl(IWindowControl)
Gets the actual visible height for a control within the container viewport. Returns null if the control is not found or visibility cannot be determined.
int? GetVisibleHeightForControl(IWindowControl control)
Parameters
controlIWindowControlThe control to check
Returns
- int?
The number of visible lines, or null if unknown
Invalidate(bool, IWindowControl?)
Marks this container as needing to be redrawn.
void Invalidate(bool redrawAll, IWindowControl? callerControl = null)
Parameters
redrawAllboolIf true, forces a complete redraw of all content.
callerControlIWindowControlThe control that triggered the invalidation, if any.