This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 52266 - Picker.Focus() does not work on Windows 8.1 and UWP (Windows Desktop)
Summary: Picker.Focus() does not work on Windows 8.1 and UWP (Windows Desktop)
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows (show other bugs)
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-02-03 06:47 UTC by Dan
Modified: 2017-03-20 15:57 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Sample app demonstrating Picker.Focus() function having no effect (339.61 KB, application/x-zip-compressed)
2017-02-03 06:47 UTC, Dan
Details

Description Dan 2017-02-03 06:47:39 UTC
Created attachment 19708 [details]
Sample app demonstrating Picker.Focus() function having no effect

I'm using Windows 10 (Version 10.0.14393 Build 14393), and have only tested this with the Windows 8.1 and UWP apps (not Android, iOS, or Windows Phone, so it may be a problem there as well). Calling a Picker's Focus() function from the UI thread does not put the Picker in focus and cause it to prompt the user to pick one of the items as expected.

I have attached a sample application that reproduces the problem by attempting to do this from both a Button's Click event and a Label's Tapped event, but neither work. This is reproducible using both the latest stable version of Xamarin.Forms (v2.3.3.180) and the newest 2.3.4-pre1 pre-release version. The only files modified from a Vanilla Xaml Forms App was MainPage.xaml and MainPage.cs in the shared portable project, and updating the Xamarin Forms NuGet package (although the older version also had the same problem).

This forum post (https://forums.xamarin.com/discussion/59573/problem-reliably-giving-focus-to-a-picker-from-a-button-click-handler-on-ios?) describes the same problem, but they only mention it not working on iOS.

This bug (https://bugzilla.xamarin.com/show_bug.cgi?id=41232) reports the same problem for the DatePicker control, so perhaps this requires the same solution, I'm not sure.
Comment 1 Rui Marinho 2017-03-20 15:57:49 UTC
Should be fixed in 2.3.5-pre1

Note You need to log in before you can comment on or make changes to this bug.