View
View is the base class for every element in the Xui visual tree. A view participates in layout, rendering, input hit-testing, and may contain child views.
The class is split across several partial files, each covering one concern:
| Article | Covers |
|---|---|
| Hierarchy | Count, indexer, add/remove child helpers |
| Lifecycle | OnAttach, OnActivate, OnDeactivate, OnDetach |
| Layout | Update, Measure/Arrange/Render pipeline, LuminarFlow vs FORK |
| State | ViewFlags, invalidation, validation, change propagation |
| Input | Pointer, scroll wheel, keyboard events |
| Focus | Focusable, IsFocused, Focus(), Blur() |
| DI | IServiceProvider, GetService, parent-chain resolution |
| Layers | ILayer structs — zero-allocation composable building blocks for input widgets |
Properties
| Property | Description |
|---|---|
Id |
Optional identifier for lookup via ViewExtensions.FindViewById |
ClassName |
Class names for lookup via ViewExtensions.FindViewsByClass |
Parent |
Parent in the visual hierarchy (set automatically) |
Frame |
Border-edge rectangle in window-relative coordinates (set during Arrange) |
Margin |
External spacing; participates in collapsed margin logic |
HorizontalAlignment |
How the view fills its horizontal slot (default: Stretch) |
VerticalAlignment |
How the view fills its vertical slot (default: Stretch) |
Direction |
Block/inline flow direction (inherited if Inherit) |
WritingMode |
Horizontal or vertical text flow |
Flow |
How the layout system treats children |
MinimumWidth / MinimumHeight |
Size floor for the border-edge box |
MaximumWidth / MaximumHeight |
Size ceiling for the border-edge box |
Hit testing
public virtual bool HitTest(Point point)
Returns true if point (in window coordinates) falls within this view or any child. The default implementation iterates children in reverse order (top-most first) and falls back to Frame.Contains(point).