Vixen
dd8b0a81
csharp
public sealed class ComboBox

A field that can be typed into as well as chosen from.

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

Remarks

⚠ The difference from Select is not the dropdown — it is that the value need not be one of the options. A combo box is a text field with suggestions; a select is a choice among a fixed set. Conflating them gives either a select that accepts nonsense or a combo box that discards what was typed.

Fields and properties (11)

  • 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 TextBox Editor

    The editable half.

  • public IconButton Toggle

    The button that drops the list.

  • public Popover List

    The floating list.

  • public IReadOnlyList<Option> Options

    The suggestions, in order.

  • public string? Value

    What is in the field.

  • public bool Required

    Whether something has to be typed or chosen.

  • public bool IsValid

    Whether what the field holds is acceptable.

  • protected override UiElement ContentHost
  • protected override AccessibleRole NativeRole

Events (1)

  • public Action<ComboBox, string?>? ValueChanged

    Raised when the text changes, whether it was typed or chosen.

Methods (4)

  • protected override void OnCreated()

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

  • public void Revalidate()

    Republishes the verdict from the editor onto the box.

  • protected override void OnRemoved()
  • public Option AddOption(string value, string? label = null)

    Adds a suggestion.

Used by (8)

  • GalleryHelloUi
  • AccessibilityTreeTestsVixen.Ui.Controls.Tests
  • AccessibleNameLocalisationTestsVixen.Ui.Controls.Tests
  • ComboEditorVixen.Ui.Controls
  • ElementStateBitTestsVixen.Ui.Controls.Tests
  • FieldValidationTestsVixen.Ui.Controls.Tests
  • LiveCombinatorPairTestsVixen.Ui.Controls.Advanced.Tests
  • SelectionTestsVixen.Ui.Controls.Tests