Can i Trigger a Picker programatically?
I would like a button beside the picker that indicates that the picker is a clickable "dropdown". But how could I open the picker when the button is clicked?
As @Hutjepower and this xamarin forums post mentions, the following code should work:
Device.BeginInvokeOnMainThread(() =>
{
if (yourPicker.IsFocused)
yourPicker.Unfocus();
yourPicker.Focus();
});
However I have found that it does not currently work on Windows 8.1 and UWP apps, at least in the latest 2.3.4-pre1 version of Xamarin.Forms. I haven't tested it on any phone/tablet devices yet though. Hopefully this bug will get fixed up in a later release. I have created a bug report for this problem.
ContentView
class - doing so would make it easier to generate custom cross-platform dialogs. I mention the UWP implementation above, because it looks like something that could be adapted to use X-Forms views w/i a contentview. SeeUserDialogsImpl
under Platforms / UWP. – ToolmakerSteve