Combobox
A select with a search field to filter its items.
Installation
bash
shellui-native add combobox
Platforms: MAUI · Avalonia. Also installs icon.
Usage
Basic
<ui:Combobox ItemsSource="{Binding Repositories}" Placeholder="Select a repository..." /><ui:Combobox ItemsSource="{Binding Repositories}" Placeholder="Select a repository..." />Not available on yet
MAUI and Avalonia
- On Avalonia, Up / Down move a highlight through the matches and Enter takes it; MAUI's Enter takes the first match.
- The Avalonia search field has focus as soon as the panel opens.
Valueis a nullablestringon Avalonia.
API
| Property | Type | Default | Description |
|---|---|---|---|
Value |
string |
— | Selected item. Two-way bindable. |
ItemsSource |
IList<string> (MAUI) · IList<string>? (Avalonia) |
null |
Items to choose from; shown with ToString(). |
Placeholder |
string |
"Select..." |
Hint shown while empty. |
SearchPlaceholder |
string |
"Search..." |
Hint in the search field. |
EmptyText |
string |
"No results found." |
Shown when nothing matches the search. |
| Event | Arguments | Description |
|---|---|---|
ValueChanged |
string |
User input only: setting Value from code or a binding doesn't raise it. |
| Method | Description |
|---|---|
SetOpen(bool open) |
Opens or closes it. |
Close() |
Closes it. |