Vixen
dd8b0a81
csharp
public sealed class MultiSelect

A field showing several choices at once.

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

Remarks

⚠ The list stays open as options are picked. A multi-select that closed on each choice would make choosing three things three separate journeys — which is what a single select is for. It closes on Escape, on a click outside, and on Enter.

Fields and properties (9)

  • protected override string TagName

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

  • protected override AccessibleRole NativeRole

    The role this kind of element has when nobody says otherwise.

  • protected override AccessibleStates NativeAccessibleState
  • public string? Placeholder
  • public bool Required
  • public IReadOnlyCollection<string> Values

    The values currently chosen.

  • public bool IsValid

    Whether what is chosen is acceptable.

  • public static readonly UiPropertyKey PlaceholderProperty

    Identity for Placeholder.

  • public static readonly UiPropertyKey RequiredProperty

    Identity for Required.

Events (1)

  • public Action<MultiSelect>? SelectionChanged

    Raised when the set of chosen values changes.

Methods (7)

  • protected override void OnCreated()

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

  • public void Revalidate()

    Republishes the verdict.

  • public bool Select(string value, bool isSelected)

    Chooses or unchooses a value.

  • protected override void OnOptionAdded(Option option)

    Called after an option is added, so a subclass can set its initial state.

  • protected override void OnOptionChosen(Option option)

    Called when an option in the list is activated.

  • public void ClearPlaceholder()

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

  • public void ClearRequired()

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

Used by (6)

  • AccessibilityTreeTestsVixen.Ui.Controls.Tests
  • ElementStateBitTestsVixen.Ui.Controls.Tests
  • FieldValidationTestsVixen.Ui.Controls.Tests
  • LiveCombinatorPairTestsVixen.Ui.Controls.Advanced.Tests
  • SelectionTestsVixen.Ui.Controls.Tests
  • EnumDrawerVixen.Editor.Inspector