Vixen
feb85697
csharp
public record class BoundRows

An @rows: a virtualizing control's row template, built once per pool slot.

Read the guide page for this →

Remarks

⚠ Not an @for modifier, and the difference is the whole design. A pool slot is not an identity: the pool only ever grows, a slot that showed row 4 shows row 900 after a scroll, and nothing is matched, survives or is re-keyed. Every rule the keyed reconciler teaches — a surviving key keeps its region, a key's body is not re-run, refs files under the matched key — is false here, so a keyword of its own keeps all of them true of @for. See Rikarin/Vixen#758.

⚠ The row element is the slot rather than a child of one, so the tag a stylesheet styles rows by is written where every other tag is — on the element — and not in a header string.

Fields and properties (4)

  • public string Index

    The name the body reads the slot's item index through — a Signal<int>, written each time the control rebinds the slot, and -1 for a slot that is showing nothing.

  • public BoundExpression Count

    The C# that says how many items there are.

  • public BoundElement? Row

    The body's one element, which is the slot: its tag is what every slot is created under and its attributes and children are applied to each one. Null when the body was not exactly one plain element, which the binder has reported.

  • public LinePositionSpan KeywordPosition

    Where @rows is, which is where a control that cannot pool is reported — Roslyn's conversion error on the generated call, mapped back to the keyword.

Methods (1)

Used by (3)

  • BinderVixen.Ui.Markup
  • BinderTestsVixen.Ui.Markup.Tests
  • ComponentEmitterVixen.Ui.Markup