Table of Contents

Class Border

Namespace
Xui.Core.UI
Assembly
Core.dll

A view that draws a background, border, and padding around a single child content view.

public class Border : View
Inheritance
Border
Inherited Members

Properties

BackgroundColor

Gets or sets the background color inside the border.

public Color BackgroundColor { get; set; }

Property Value

Color

BorderColor

Gets or sets the color of the border stroke.

public Color BorderColor { get; set; }

Property Value

Color

BorderThickness

Gets or sets the thickness of the border on each side.

public Frame BorderThickness { get; set; }

Property Value

Frame

Content

Gets or sets the content view displayed inside the border.

public View? Content { get; set; }

Property Value

View

CornerRadius

Gets or sets the corner radius used to round the corners of the border and background.

public CornerRadius CornerRadius { get; set; }

Property Value

CornerRadius

Padding

Gets or sets the padding between the border and the content.

public Frame Padding { get; set; }

Property Value

Frame

Methods

ArrangeCore(Rect, IMeasureContext)

Performs the layout pass by arranging content and children within the view's border edge box, using the provided rectangle.

protected override void ArrangeCore(Rect rect, IMeasureContext context)

Parameters

rect Rect

The final rectangle (position and size) allocated to this view's border edge box.

context IMeasureContext

The layout metrics context providing access to platform-specific measurements, text sizing, and pixel snapping utilities.

MeasureCore(Size, IMeasureContext)

Determines the minimum size that this view's border edge box requires, given the maximum available size. Margin is not part of this size.

protected override Size MeasureCore(Size constraints, IMeasureContext context)

Parameters

constraints Size
context IMeasureContext

The layout metrics context providing access to platform-specific measurements, text sizing, and pixel snapping utilities.

Returns

Size

The desired size of the border edge box based on content and layout logic.

RenderCore(IContext)

Renders the content and children of this view using the provided rendering context.

protected override void RenderCore(IContext context)

Parameters

context IContext

The drawing context used for rendering visual content to the output surface.