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
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(Invalidation, IWindowControl?)
Marks this container as needing the specified work on the next frame. The request propagates up the container chain and folds into the owning window's frame-intent accumulator.
void Invalidate(Invalidation work, IWindowControl? callerControl = null)
Parameters
workInvalidationThe kind of work requested: Repaint (appearance-only, Measure skipped) or Relayout (full layout).
callerControlIWindowControlThe control that triggered the invalidation, if any (cycle guard).
Invalidate(bool, IWindowControl?)
Marks this container as needing work on the next frame. Compatibility overload preserving the
previous boolean signature: true maps to Relayout,
false to Repaint.
void Invalidate(bool redrawAll, IWindowControl? callerControl = null)
Parameters
redrawAllbooltruefor a full re-layout,falsefor an appearance-only repaint.callerControlIWindowControlThe control that triggered the invalidation, if any (cycle guard).