Box

Class
Namespace: RazorConsole.Components
Assembly: RazorConsole.Core

Definition

public class Box : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender

Constructors

1
NameTypeDescription
Box()Constructor—

Properties

16
NameTypeDescription
Appearance
BorderBoxBorderOptional border style used by panel-compatible boxes.
BorderColorNullable<Color>Optional border color used by panel-compatible boxes.
ClassStringCSS class emitted for translator compatibility. Default is box.
FillHeightBooleanWhether the box should fill the height offered by its parent.
FillWidthBooleanWhether the box should fill the width offered by its parent.
HeightNullable<Int32>Explicit height in terminal rows.
TitleColorNullable<Color>Optional title color used by panel-compatible boxes.
WidthNullable<Int32>Explicit width in terminal cells.
Common
ChildContentRenderFragmentContent rendered inside the box.
TitleStringOptional title used by panel-compatible boxes.
Other
AdditionalAttributesIReadOnlyDictionary<String, Object>Additional attributes applied to the emitted box element.
ExpandBooleanWhether the box should expand when a parent container allocates remaining space. Prefer FillWidth and FillHeight for new code.
HorizontalNullable<HorizontalAlignment>Horizontal child alignment used by align-compatible boxes.
MarginNullable<Padding>Margin outside the box border.
PaddingNullable<Padding>Padding around the child content.
VerticalNullable<VerticalAlignment>Vertical child alignment used by align-compatible boxes.

Methods

1
NameTypeDescription
BuildRenderTree(RenderTreeBuilder)()MethodRenders the component to the supplied RenderTreeBuilder.