Table of Contents

Struct FocusBorderLayer<TView, TChild>

Namespace
Xui.Core.UI.Layer
Assembly
Xui.Core.dll

A BorderLayer<TChild> variant that switches border color when the host view has keyboard focus. All layout and rendering is delegated to an inner BorderLayer<TChild>; only Render(TView, IContext) swaps the color, and OnFocus(TView) / OnBlur(TView) request a repaint.

public struct FocusBorderLayer<TView, TChild> : ILayer<TView> where TView : ILayerHost where TChild : struct, ILayer<TView>

Type Parameters

TView
TChild
Implements
ILayer<TView>
Inherited Members

Fields

Border

The inner border layer that owns all geometry and rendering.

public BorderLayer<TView, TChild> Border

Field Value

BorderLayer<TView, TChild>

FocusedBorderColor

Border color used when the host view has keyboard focus.

public Color FocusedBorderColor

Field Value

Color

Properties

BackgroundColor

public Color BackgroundColor { get; set; }

Property Value

Color

BorderColor

public Color BorderColor { get; set; }

Property Value

Color

BorderThickness

public Frame BorderThickness { get; set; }

Property Value

Frame

CornerRadius

public CornerRadius CornerRadius { get; set; }

Property Value

CornerRadius

Padding

public Frame Padding { get; set; }

Property Value

Frame

Methods

Animate(TView, TimeSpan, TimeSpan)

Advances time-based state (animations, blinking cursors, etc.).

public void Animate(TView view, TimeSpan previousTime, TimeSpan currentTime)

Parameters

view TView
previousTime TimeSpan
currentTime TimeSpan

Arrange(TView, Rect, IMeasureContext)

Finalises position and size within rect.

public void Arrange(TView view, Rect rect, IMeasureContext context)

Parameters

view TView
rect Rect
context IMeasureContext

Measure(TView, Size, IMeasureContext)

Returns the desired border-edge size given the available space.

public Size Measure(TView view, Size availableSize, IMeasureContext context)

Parameters

view TView
availableSize Size
context IMeasureContext

Returns

Size

OnBlur(TView)

Called when the host view loses keyboard focus.

public void OnBlur(TView view)

Parameters

view TView

OnChar(TView, ref KeyEventRef)

Handles a character input event while the host view has focus.

public void OnChar(TView view, ref KeyEventRef e)

Parameters

view TView
e KeyEventRef

OnFocus(TView)

Called when the host view gains keyboard focus.

public void OnFocus(TView view)

Parameters

view TView

OnKeyDown(TView, ref KeyEventRef)

Handles a key-down event while the host view has focus.

public void OnKeyDown(TView view, ref KeyEventRef e)

Parameters

view TView
e KeyEventRef

OnPointerEvent(TView, ref PointerEventRef, EventPhase)

Handles a pointer event in the given dispatch phase.

public void OnPointerEvent(TView view, ref PointerEventRef e, EventPhase phase)

Parameters

view TView
e PointerEventRef
phase EventPhase

Render(TView, IContext)

Draws content. Called after Arrange.

public void Render(TView view, IContext context)

Parameters

view TView
context IContext

Update(TView, ref LayoutGuide)

Drives one or more layout passes. Mirrors Update(LayoutGuide). The default per-pass methods are preferred for clarity; override this only when a single-DFS LuminarFlow traversal is needed (leaf layers or single-child-stretch containers).

public void Update(TView view, ref LayoutGuide guide)

Parameters

view TView
guide LayoutGuide