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; }

Kind

The picker's native button style.

Type: ButtonStyle

public ButtonStyle Kind { get; set; }

Padding

Padding around the title and indicator, or null for the size class default.

Type: Thickness?

public Thickness? Padding { 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; }

ShowsIndicator

Whether a popup indicator appears after the selected item's title.

Type: bool

public bool ShowsIndicator { get; set; }

Size

The built-in size class.

Type: ButtonSize

public ButtonSize Size { get; set; }