Plugin.PickerViews
1.0.2
dotnet add package Plugin.PickerViews --version 1.0.2
NuGet\Install-Package Plugin.PickerViews -Version 1.0.2
<PackageReference Include="Plugin.PickerViews" Version="1.0.2" />
<PackageVersion Include="Plugin.PickerViews" Version="1.0.2" />
<PackageReference Include="Plugin.PickerViews" />
paket add Plugin.PickerViews --version 1.0.2
#r "nuget: Plugin.PickerViews, 1.0.2"
#:package Plugin.PickerViews@1.0.2
#addin nuget:?package=Plugin.PickerViews&version=1.0.2
#tool nuget:?package=Plugin.PickerViews&version=1.0.2
Plugin.PickerViews
A small set of .NET MAUI picker controls:
| Control | What it does |
|---|---|
DateTimePicker |
A combined calendar + 24‑hour clock. Single day or a date range (spanning months/years). Time can be nudged with arrows or typed directly. |
WritablePickerView |
A Picker whose popup has a search box — type to filter the list live, press return to add a new (alphabetically‑inserted) item. |
ImagePickerView |
A Picker whose rows are (image, text). Images come from a URL (lazy‑loaded), a resource, or a stream; text‑only rows left‑align. |
AndroidPicker |
A Picker that gives every non‑Android platform the look and feel of Android's default (Material single‑choice) picker dialog. Opt in with UseAndroidPicker; ignored on Android. |
Targets net10.0 for Android, iOS, and Mac Catalyst (and Windows on Windows hosts). Material 3 and live light/dark theming are supported.
Install
dotnet add package Plugin.PickerViews
Setup
Register the plugin in MauiProgram.cs:
using Plugin.PickerViews;
builder
.UseMauiApp<App>()
.UsePickerViews(); // Material 3 on by default; pass useMaterial3: false to opt out
Material 3 on Android must be applied before base.OnCreate, so add one line to your Android MainActivity:
protected override void OnCreate(Bundle? savedInstanceState)
{
this.ApplyPickerViewsTheme(); // no-op when Material 3 is disabled
base.OnCreate(savedInstanceState);
}
DateTimePicker
A self-contained view. It does not hide itself — it raises Dismissed so the host decides how it was presented (overlay, popup, modal, …).
<pv:DateTimePicker x:Name="Picker"
IsEditable="True"
Accepted="OnAccepted"
Dismissed="OnDismissed" />
private void OnAccepted(object? sender, DateTimeSelectedEventArgs e)
{
(DateTime start, DateTime? end) = e.SelectedRange; // end is null for a single day
}
private void OnDismissed(object? sender, DateTimePickerDismissedEventArgs e)
=> Overlay.IsVisible = false; // host owns presentation
Interaction
- Drop-down year selector (1900–2200) and
‹ ›month arrows. - Tap a day to set the start (an opaque circle marks it).
- Long-press another day to set the range end — the span is coloured and may cross months/years.
- 24-hour time via ▲/▼ arrows, or type it directly when
IsEditableis true.
Bindable properties
| Property | Type | Default | Notes |
|---|---|---|---|
StartDate |
DateTime |
DateTime.Now |
Start day; on Accept, the chosen start. |
StartTime |
TimeSpan |
DateTime.Now.TimeOfDay |
24-hour time (seconds dropped). |
EndDate |
DateTime |
(unset) | Range end; default(DateTime) means "no end". |
IsEditable |
bool |
false |
When true, the hour/minute can be typed; otherwise read-only. |
Events: Accepted (DateTimeSelectedEventArgs — SelectedDateTime, EndDateTime, SelectedRange tuple), Cancelled, Dismissed.
WritablePickerView
Inherits Picker (so ItemsSource, SelectedItem, SelectedIndex, Title all work). Tapping the field opens a search/add popup.
<pv:WritablePickerView Title="Choose or add a fruit"
ItemsSource="{Binding Fruit}"
SelectedIndexChanged="OnSelectionChanged"
ItemAdded="OnItemAdded" />
- Typing filters the list live (the magnifier turns blue).
- Pressing return adds the text, inserting it alphabetically, selects it, and closes.
- Picking a row selects it and closes.
Events: ItemAdded(string), SearchRequested(string), plus the inherited SelectedIndexChanged.
ImagePickerView
Inherits Picker. Items are ImagePickerItems.
Picker.ItemsSource = new ObservableCollection<ImagePickerItem>
{
ImagePickerItem.FromUrl("https://example.com/tile.png", "From a URL"), // lazy-loaded with a spinner
ImagePickerItem.FromResource("dotnet_bot.png", "From a resource"),
ImagePickerItem.FromStream(() => new MemoryStream(bytes), "From a stream"),
ImagePickerItem.TextOnly("No image"), // text left-aligns
};
The closed field shows the selected item's text; the popup shows image + text rows. SelectedItem returns the chosen ImagePickerItem.
AndroidPicker
On platforms other than Android it replaces the native picker (iOS wheel, Windows combo, …) with a popup that replicates Android's default Material single‑choice dialog — a title, a scrollable radio‑button list, and a Cancel action. Tapping a row selects it and closes. On Android it is ignored — the native picker already provides that look and feel.
Use it two ways:
1. UseAndroidPicker attached property — on any Picker
Set pv:AndroidPicker.UseAndroidPicker="True" on the built‑in MAUI Picker (or any Picker subclass, yours or a third party's). Defaults to false, and can be bound to toggle the Android look at runtime.
<Picker Title="Choose a country"
pv:AndroidPicker.UseAndroidPicker="True"
ItemsSource="{Binding Countries}"
ItemDisplayBinding="{Binding Name}"
SelectedIndexChanged="OnSelectionChanged" />
// From code, on any picker:
AndroidPicker.SetUseAndroidPicker(myPicker, true);
2. AndroidPicker standalone control
Drop it in and it shows the Android dialog automatically (it enables the behaviour on itself):
<pv:AndroidPicker Title="Choose a country"
ItemsSource="{Binding Countries}"
ItemDisplayBinding="{Binding Name}"
SelectedIndexChanged="OnSelectionChanged" />
Row text follows ItemDisplayBinding when set, otherwise the item's ToString(). Works with both ItemsSource and the manual Items list; picking a row drives SelectedIndex, so SelectedItem and SelectedIndexChanged behave exactly as on a normal Picker.
Attached property
| Property | Type | Default | Notes |
|---|---|---|---|
AndroidPicker.UseAndroidPicker |
bool |
false |
Attached to any Picker. When true, taps open the Android‑style popup instead of the native picker. Ignored on Android. |
Theming
- Material 3 — enabled by default via
UsePickerViews()+ApplyPickerViewsTheme()(Android). PassuseMaterial3: falseto keep the platform default. - Light / dark — all custom surfaces (cards, text, borders, dividers, image placeholders) use
AppThemeBinding, so they follow the system theme and switch live.
License
DILLIGAF © 2026 Paul F. Johnson.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-android36.0 is compatible. net10.0-browser was computed. net10.0-ios was computed. net10.0-ios26.0 is compatible. net10.0-maccatalyst was computed. net10.0-maccatalyst26.0 is compatible. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Maui.Controls (>= 10.0.20)
-
net10.0-android36.0
- Microsoft.Maui.Controls (>= 10.0.20)
-
net10.0-ios26.0
- Microsoft.Maui.Controls (>= 10.0.20)
-
net10.0-maccatalyst26.0
- Microsoft.Maui.Controls (>= 10.0.20)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
1.0.2: AndroidPicker's UseAndroidPicker is now an attached property usable on any Picker (pv:AndroidPicker.UseAndroidPicker="True"), not just the AndroidPicker control. Honors ItemDisplayBinding. Ignored on Android.