ConsoleForge 0.3.0
Elm-architecture TUI framework for .NET 8
Loading...
Searching...
No Matches
ConsoleForge.Widgets.TextBlock Class Referencesealed

A widget that renders a single string, wrapping at region width. More...

Inheritance diagram for ConsoleForge.Widgets.TextBlock:

Public Member Functions

void Render (IRenderContext ctx)
 Render this widget into the provided context.The context carries the allocated region, theme, and color profile. Implementations MUST NOT write outside ctx.Region.
 TextBlock ()
 Object-initializer constructor.
 TextBlock (string text, Style? style=null)
 Positional constructor for inline usage.

Properties

SizeConstraint Height = SizeConstraint.Auto [get]
 Height constraint used by the layout engine.
Style Style = Style.Default [get]
 Visual style applied to the rendered text. Inherits Theme.BaseStyle when no properties are set.
string Text = "" [get]
 The text content to display, wrapped at the region width.
SizeConstraint Width = SizeConstraint.Auto [get]
 Width constraint used by the layout engine.

Detailed Description

A widget that renders a single string, wrapping at region width.

Inherits style from the active theme's BaseStyle when widget style has no properties set.


The documentation for this class was generated from the following file:
  • src/ConsoleForge/Widgets/TextBlock.cs