Struct ContentLayer
A terminal layer that delegates layout and rendering to a child View, bridging the layer tree back into the standard view hierarchy. Input routing is left to the EventRouter which hit-tests the child view directly, so all input methods here are intentional no-ops.
public struct ContentLayer : ILayer<View>
- Implements
- Inherited Members
Fields
Child
The child view to measure, arrange, and render.
public View? Child
Field Value
Methods
Animate(View, TimeSpan, TimeSpan)
Advances time-based state (animations, blinking cursors, etc.).
public void Animate(View view, TimeSpan previousTime, TimeSpan currentTime)
Parameters
Arrange(View, Rect, IMeasureContext)
Finalises position and size within rect.
public void Arrange(View view, Rect rect, IMeasureContext context)
Parameters
viewViewrectRectcontextIMeasureContext
Measure(View, Size, IMeasureContext)
Returns the desired border-edge size given the available space.
public Size Measure(View view, Size availableSize, IMeasureContext context)
Parameters
viewViewavailableSizeSizecontextIMeasureContext
Returns
OnBlur(View)
Called when the host view loses keyboard focus.
public void OnBlur(View view)
Parameters
viewView
OnChar(View, ref KeyEventRef)
Handles a character input event while the host view has focus.
public void OnChar(View view, ref KeyEventRef e)
Parameters
viewVieweKeyEventRef
OnFocus(View)
Called when the host view gains keyboard focus.
public void OnFocus(View view)
Parameters
viewView
OnKeyDown(View, ref KeyEventRef)
Handles a key-down event while the host view has focus.
public void OnKeyDown(View view, ref KeyEventRef e)
Parameters
viewVieweKeyEventRef
OnPointerEvent(View, ref PointerEventRef, EventPhase)
Handles a pointer event in the given dispatch phase.
public void OnPointerEvent(View view, ref PointerEventRef e, EventPhase phase)
Parameters
viewViewePointerEventRefphaseEventPhase
Render(View, IContext)
Draws content. Called after Arrange.
public void Render(View view, IContext context)
Parameters
Update(View, 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(View view, ref LayoutGuide guide)
Parameters
viewViewguideLayoutGuide