Picker<TItem>

A menu-style selection button wrapping UIButton + UIMenu.
public class Picker<TItem> : Control where TItem : class
Type parameterSummary
(class) TItemThe item type.

Properties

ItemTitle

How an item is labeled in the menu. Defaults to ToString().

Type: Func<TItem, string>

public Func<TItem, string> ItemTitle { get; set; }

ItemsSource

The selectable items.

Live when the list is an ObservableCollection.

Type: BindableList<TItem>

public BindableList<TItem> ItemsSource { get; set; }

Placeholder

Text shown when nothing is selected.

Type: Bindable<string?>

public Bindable<string?> Placeholder { get; set; }

SelectedItem

The selected item, or null for none.

Type: Bindable<TItem?>

public Bindable<TItem?> SelectedItem { get; set; }

SelectionChanged

Invoked with the newly selected item.

Type: Action<TItem>?

public Action<TItem>? SelectionChanged { get; set; }