DividerEl class Core
Horizontal divider line, vertically centered — separator rows in menus/forms. DividerEl.Visible gates it per item (a non-separator row draws nothing), so one composition serves mixed row kinds.
public sealed class DividerEl : SlotEl
- Namespace
- ArionUI.Presentation
- Package
- ArionUI.Presentation ·
dotnet add package ArionUI.Presentation --prerelease - Inherits
- SlotEl
Constructors
DividerEl
public DividerEl();
Properties
Color
public Rgba? Color { get; init; }Colour of the line; null takes the theme's card border colour.
Visible
public Func<object, bool>? Visible { get; init; }Per item: false draws nothing, so one composition serves mixed row kinds.
Methods
DrawContent
protected override void DrawContent(IRenderSurface s, LogRect rect, object item, IInteractionState state, int itemIndex);Draws the element's own content into rect, which is already shrunk by SlotEl.Padding and has the background behind it. The layout math here must match SlotEl.Resolve, or the click zones drift away from the pixels.
IntrinsicWidth
protected internal override double IntrinsicWidth(object item, Func<string, TextStyle, double>? measure);Intrinsic content width. measure measures a string the way the surface will actually draw it; null falls back to a per-character estimate.
Drawing and HIT-TESTING must use the same answer: give one of them the measure and not the other, and the click zone drifts away from the pixels.
