Panel
ClassFor examples and usage details, see the component documentation.
View Panel ComponentNamespace:
RazorConsole.ComponentsAssembly:
RazorConsole.CoreDefinition
public class Panel : ComponentBase, IComponent, IHandleEvent, IHandleAfterRenderConstructors
1| Name | Type | Description |
|---|---|---|
Panel() | Constructor | — |
Properties
9| Name | Type | Description |
|---|---|---|
Appearance | ||
Border | BoxBorder | Style of the panel border. See BoxBorder for available styles like Rounded, Square, and Double. |
BorderColor | Nullable<Color> | Color of the panel border. If null , uses default console color. |
Height | Nullable<Int32> | Height of the panel in lines. If null or less than 1, height is automatically determined by content. |
TitleColor | Nullable<Color> | Color of the panel title. If null , uses default console color. |
Width | Nullable<Int32> | Width of the panel in characters. If null or less than 1, width is automatically determined by content. |
Common | ||
ChildContent | RenderFragment | Renders a panel with optional title, border, and padding using Spectre.Console's Panel renderable. |
Title | String | Title text displayed at the top of the panel border. If null or empty, no title is shown. |
Other | ||
Expand | Boolean | Whether the panel should expand to fill available space. Default is false . |
Padding | Nullable<Padding> | Padding inside the panel border as (left, top, right, bottom). If null , no padding is applied. |
Methods
1| Name | Type | Description |
|---|---|---|
BuildRenderTree(RenderTreeBuilder)() | Method | — |