public sealed class AccordionSeveral 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.
⚠ A section is an Expander child, however it got there. This used to keep a list that only AddSection wrote to, and call that deliberate — the shape RadioGroup.AddOption has. Markup is what made it wrong: an <Accordion> with expanders written inside it is the only way to author one in a .vxml, there is no AddSection to call from there, and the registry stayed empty — so AllowMultiple="false" parsed, bound, and did nothing at all.
Fields and properties (5)
protected override string TagNameThe element name this type answers to when a caller does not choose one.
protected override bool AcceptsFocusWhether the focus can rest on this kind of control at all.
public bool AllowMultiplepublic IReadOnlyList<Expander> SectionsThe sections, in order.
public static readonly UiPropertyKey AllowMultiplePropertyIdentity 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 (5)
- GalleryHelloUi
- AccessibilityTreeTestsVixen.Ui.Controls.Tests
- NavigationInteractionTestsVixen.Ui.Controls.Tests
- NestedTagTestsVixen.Ui.Controls.Advanced.Tests
- SelectionTestsVixen.Ui.Controls.Tests