Border
DisplayCreates a bordered panel around its children.
@using Spectre.Console
@using RazorConsole.Components
<Border BoxBorder="BoxBorder.Rounded" BorderColor="Color.Blue">
<Markup Content="Content inside border" />
</Border>Parameters
13| Name | Type | Default | Description |
|---|---|---|---|
Behavior | |||
Focusable | Boolean | — | Makes the scroll container a Tab stop that scrolls with the arrow keys, PageUp, PageDown, Home and End. See Focusable. |
OverscrollBehavior | OverscrollBehavior | — | Whether scrolling continues in the parent scroll container once this one reaches its limit. See OverscrollBehavior. |
Appearance | |||
BorderColor | Color? | — | Color of the border. If null, uses default console color. |
BoxBorder | BoxBorder | — | Style of the border. Default is Rounded. See BoxBorder for available styles. |
Events | |||
ScrollTopChanged | EventCallback<Int32> | — | Raised when the engine changes the scroll offset. |
Common | |||
ChildContent | RenderFragment | — | Renders a simple border around content without a title (simplified wrapper for Panel). |
Other | |||
Controller | ScrollController | — | Scrolls this container from code. See Controller. |
Overflow | OverflowMode | — | What happens to content taller than the border. See Overflow. |
Padding | Padding | — | Padding inside the border as (left, top, right, bottom). Default is (0, 0, 0, 0). |
ScrollId | String | — | Stable identity of the scroll state. See ScrollId. |
ScrollTop | Int32 | — | Scroll offset in rows, applied when its value changes. See ScrollTop. |
Scrollbar | ScrollbarSettings | — | How the scrollbar looks and where it is drawn. See Scrollbar. |
StickToBottom | Boolean | — | Keeps the end of the content in view while it grows. See StickToBottom. |