dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.97k stars 1.71k forks source link

Add "Open/Close" API to picker controls #8945

Open PureWeen opened 2 years ago

PureWeen commented 2 years ago

Description

Currently the only way to open/close picker controls is to call focus/unfocus. This is non intuitive and requires you to have to wire up odd behavior at the platform level in order to make this work.

(Public) API Changes

IPicker

Properties

API Description
open opens the pickers dialog.
close closes the pickers dialog.

Usage Scenarios

<DatePicker Visible="false" x:name="picker" />
picker.Open

Backward Compatibility

N/A

Difficulty

Low

maxiking01 commented 6 months ago

These function will be useful for Nullable DatePicker where a datepicker is hidden and should be opened when user clicks the control. So far the Nullable DatePicker was implemented using Focus, UnFocus function.

mos379 commented 4 months ago

Adding my support here! Really need some possibility to show a hidden picker on windows and ios

SmartSquareAZ commented 4 months ago

Is there progress on this topic? This function would be very nice!

FreakyAli commented 3 months ago

+1

Willing to work on this myself if I have to,

@PureWeen can you confirm what's needed here?