blob: 491d5fdd3071667c404db8256adbbf384e7b7eee (
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
|
using System.Diagnostics;
using Xamarin.Forms.CustomAttributes;
namespace Xamarin.Forms.Controls
{
[Preserve (AllMembers=true)]
[Issue (IssueTracker.Github, 2292, "DatePicker not shown when .Focus() is called", PlatformAffected.WinPhone)]
public class Issue2292 : ContentPage
{
public Issue2292 ()
{
var datePicker = new DatePicker ();
var datePickerBtn = new Button {
Text = "Click me to call .Focus on DatePicker"
};
datePickerBtn.Clicked += (sender, args) => {
datePicker.Focus ();
};
var datePickerBtn2 = new Button {
Text = "Click me to call .Unfocus on DatePicker"
};
datePickerBtn2.Clicked += (sender, args) => {
datePicker.Unfocus ();
};
Content = new StackLayout {
Children = {
datePickerBtn,
datePickerBtn2,
datePicker,
}
};
}
}
}
|