Namespace Xui.Core.UI
Namespaces
Classes
- Border
A view that draws a background, border, and padding around a single child content view. All rendering is owned by BorderLayer<TChild> composed with ContentLayer. The child view lives in
Layer.Child.Childand is managed via the standard SetProtectedChild<T>(ref T?, T?) lifecycle.
- HorizontalStack
A layout container that arranges its children horizontally from left to right.
Each child is measured with unconstrained width and a constrained height. The container expands to fit the combined width of all children.
- HorizontalUniformStack
A layout container that arranges its children in a horizontal stack, assigning each child the same width.
- ImageView
A view that displays an image. Works like
HTMLImageElement: it holds an IImage handle (acquired from the service chain) and sets its source via Load(string). The platform catalog handles caching and device-lost rehydration transparently.
- Label
A view that displays a single line of styled text.
- ScrollView
A container that clips its content and allows scrolling via pointer drag/fling and scroll wheel input. Supports vertical, horizontal, or both axes. Displays thin overlay scrollbar indicators on the relevant edges.
- TextBox
A single-line text input view implemented as
LayerView<View, FocusBorderLayer<View, TextInputLayer>>. All text editing state, selection, caret blinking, and hit-testing live in TextInputLayer; focus-aware border drawing lives in FocusBorderLayer<TView, TChild>.
- VerticalStack
A layout container that arranges its children vertically from top to bottom.
Each child is measured with an unconstrained height and is allowed to take up as much vertical space as needed. The container expands to fit the combined height of all children.
- VerticalUniformStack
A layout container that arranges its children in a vertical stack, giving each child the same height.
- View
Base class for all UI elements in the Xui layout engine. A view participates in layout, rendering, and input hit testing, and may contain child views.
- ViewCollection
A base class for container views that hold and manage a list of child views. Provides methods for adding, removing, rendering, and hit testing children.
- ViewExtensions
Provides extension methods for navigating the Xui view tree.
Structs
- AttachEventRef
Passed to OnAttach(ref AttachEventRef) when a view is added to the visual tree.
- ClassNameCollection
A compact collection of CSS-like class name strings for a view. Stores up to 3 class names inline without allocation. If more are added, spills over into a HashSet<T>.
- DetachEventRef
Passed to OnDetach(ref DetachEventRef) when a view is removed from the visual tree.
- LayoutGuide
Encapsulates the parameters and results of a layout pass (Measure, Arrange, Render) for a view.
- ViewExtensions.ParentsEnumerable
Allocation-free enumerable for walking up the parent chain of a view.
- ViewExtensions.ParentsEnumerable.Enumerator
Enumerator for ViewExtensions.ParentsEnumerable, walking up the view hierarchy.
Interfaces
- IFocus
Service interface for programmatic focus navigation. Resolved via
this.GetService<IFocus>()from any View. RootView provides the default implementation.
Enums
- Direction
Indicates the semantic inline direction of content, such as left-to-right or right-to-left. Used to resolve text alignment, layout flow, and mirroring behavior.
- Flow
Controls whether layout and rendering should respect directionality and writing mode. Used to suppress mirroring and bidi-aware behavior for diagrams, graphs, and non-linguistic views.
- FlowDirection
Represents the resolved physical direction of layout flow along an axis. This is derived from WritingMode and Direction, and is used to control stacking, alignment, and layout flow along block or inline axes.
- HorizontalAlignment
Specifies how a view should be aligned horizontally within its layout bounds. Used by parent containers during layout to position the view along the inline axis.
- LayoutGuide.Align
Defines alignment of a view within a layout axis.
- LayoutGuide.LayoutPass
Flags indicating which type of layout pass is being performed. Multiple passes may be combined (e.g., Measure | Render).
- LayoutGuide.SizeTo
Defines how the view should interpret the size constraints during measurement.
- ScrollDirection
Controls which axis (or axes) a ScrollView scrolls along.
- VerticalAlignment
Specifies how a view should be aligned vertically within its layout bounds. Used by parent containers to control vertical positioning along the block axis.
- View.ViewFlags
Flags used internally by a View to track invalidation state across measure, arrangement, rendering, and hit testing phases. These flags allow the framework to selectively recompute only dirty subtrees during recursive passes.
- WritingMode
Specifies the orientation and flow direction of text and block layout. Affects which axis is considered "block" and "inline".