Border

Display

Creates 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
NameTypeDefaultDescription
Behavior
FocusableBoolean—Makes the scroll container a Tab stop that scrolls with the arrow keys, PageUp, PageDown, Home and End. See Focusable.
OverscrollBehaviorOverscrollBehavior—Whether scrolling continues in the parent scroll container once this one reaches its limit. See OverscrollBehavior.
Appearance
BorderColorColor?—Color of the border. If null, uses default console color.
BoxBorderBoxBorder—Style of the border. Default is Rounded. See BoxBorder for available styles.
Events
ScrollTopChangedEventCallback<Int32>—Raised when the engine changes the scroll offset.
Common
ChildContentRenderFragment—Renders a simple border around content without a title (simplified wrapper for Panel).
Other
ControllerScrollController—Scrolls this container from code. See Controller.
OverflowOverflowMode—What happens to content taller than the border. See Overflow.
PaddingPadding—Padding inside the border as (left, top, right, bottom). Default is (0, 0, 0, 0).
ScrollIdString—Stable identity of the scroll state. See ScrollId.
ScrollTopInt32—Scroll offset in rows, applied when its value changes. See ScrollTop.
ScrollbarScrollbarSettings—How the scrollbar looks and where it is drawn. See Scrollbar.
StickToBottomBoolean—Keeps the end of the content in view while it grows. See StickToBottom.

API