Plugin.PickerViews 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Plugin.PickerViews --version 1.0.1
                    
NuGet\Install-Package Plugin.PickerViews -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Plugin.PickerViews" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Plugin.PickerViews" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Plugin.PickerViews" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Plugin.PickerViews --version 1.0.1
                    
#r "nuget: Plugin.PickerViews, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Plugin.PickerViews@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Plugin.PickerViews&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Plugin.PickerViews&version=1.0.1
                    
Install as a Cake Tool

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 IsEditable is 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

Inherits Picker. On platforms other than Android it can replace 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.

<pv:AndroidPicker Title="Choose a country"
                  UseAndroidPicker="True"
                  ItemsSource="{Binding Countries}"
                  SelectedIndexChanged="OnSelectionChanged" />
  • Use it as a standalone control, or bind UseAndroidPicker to toggle the Android look at runtime.
  • When UseAndroidPicker is false (the default) the platform's own native picker is used.
  • On Android the property is ignored — the native picker already provides that look and feel.

Bindable properties

Property Type Default Notes
UseAndroidPicker bool false When true, taps open the Android‑style popup instead of the native picker. Ignored on Android.

Plus the inherited ItemsSource, SelectedItem, SelectedIndex, Title and SelectedIndexChanged.


Theming

  • Material 3 — enabled by default via UsePickerViews() + ApplyPickerViewsTheme() (Android). Pass useMaterial3: false to 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 176 7/27/2026
1.0.1 138 7/27/2026
1.0.0 146 7/15/2026

1.0.1: Add AndroidPicker — gives non-Android platforms the look and feel of Android's default Material single-choice picker dialog, opt-in via the UseAndroidPicker bindable property (ignored on Android).