summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2333.cs
blob: 83eb8517d49f39e36cc1d427a5effa119137d329 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System.Diagnostics;

using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;

namespace Xamarin.Forms.Controls
{	
	[Preserve (AllMembers=true)]
	[Issue (IssueTracker.Github, 2333, "TimePicker not shown when .Focus() is called", PlatformAffected.WinPhone)]
	public class Issue2333 : ContentPage
	{
		public Issue2333 ()
		{
			var timePicker = new TimePicker ();
			var timePickerBtn = new Button {
				Text = "Click me to call .Focus on TimePicker"
			};

			timePickerBtn.Clicked += (sender, args) => {
				timePicker.Focus ();
			};

			var timePickerBtn2 = new Button {
				Text = "Click me to call .Unfocus on TimePicker"
			};

			timePickerBtn2.Clicked += (sender, args) => {
				timePicker.Unfocus ();
			};

			Content = new StackLayout {
				Children = {
					timePickerBtn,
					timePickerBtn2,
					timePicker,
				}
			};
		}
	}
}