Multi Select
A searchable select for several options, shown as chips.
Installation
bash
shellui-native add multi-select
Platforms: MAUI · Avalonia. Also installs icon, wrap-layout.
Usage
Basic
<ui:MultiSelect ItemsSource="{Binding Repositories}" Values="{Binding Picked}"
Placeholder="Pick repositories" /><ui:MultiSelect ItemsSource="{Binding Repositories}" Values="{Binding Picked}"
Placeholder="Pick repositories" />Not available on yet
MAUI and Avalonia
- On Avalonia, Up / Down move a highlight through the matches and Enter toggles it; MAUI's Enter takes the first match.
- The Avalonia search field has focus as soon as the panel opens.
API
| Property | Type | Default | Description |
|---|---|---|---|
ItemsSource |
IList<string> (MAUI) · IList<string>? (Avalonia) |
null |
Items to choose from; shown with ToString(). |
Values |
IList<string> (MAUI) · IList<string>? (Avalonia) |
null |
Selected values. |
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 |
|---|---|---|
ValuesChanged |
IReadOnlyList<string> |
User input only: setting Values, or calling Toggle, from code doesn't raise it. |
| Method | Description |
|---|---|
SetOpen(bool open) |
Opens or closes it. |
Close() |
Closes it. |
Toggle(string text) |
Opens it if closed, closes it if open. |