Vixen
02b45cc4
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 (4)

  • protected override string TagName

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

  • public string? Placeholder
  • public IReadOnlyCollection<string> Values

    The values currently chosen.

  • public static readonly UiPropertyKey PlaceholderProperty

    Identity for Placeholder.

Events (1)

  • public Action<MultiSelect>? SelectionChanged

    Raised when the set of chosen values changes.

Methods (4)

  • 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.

Used by (2)

  • SelectionTestsVixen.Ui.Controls.Tests
  • EnumDrawerVixen.Editor.Inspector