Vixen
02b45cc4
csharp
public sealed class Accordion

Several expanders, of which one may be open at a time.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ The exclusion is optional and off by default. An accordion that closes what you were reading because you opened something else is the single most complained-about pattern in interface design, and it is right exactly when the sections are alternatives rather than a list — so it is a property, and the default is the one that does not lose the user's place.

Fields and properties (5)

  • protected override string TagName

    The element name this type answers to when a caller does not choose one.

  • protected override bool AcceptsFocus

    Whether the focus can rest on this kind of control at all.

  • public bool AllowMultiple
  • public IReadOnlyList<Expander> Sections

    The sections, in order.

  • public static readonly UiPropertyKey AllowMultipleProperty

    Identity for AllowMultiple.

Methods (3)

  • protected override void OnCreated()

    Builds whatever this element is made of, once, as it joins a document.

  • public Expander AddSection(string? label = null)

    Adds a section.

  • public void ClearAllowMultiple()

    Unsets AllowMultiple, so it takes its default or its ancestor's value again.

Used by (3)

  • ShellHelloUi
  • NavigationInteractionTestsVixen.Ui.Controls.Tests
  • SelectionTestsVixen.Ui.Controls.Tests