maui-linux/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issu.../Issue2333.cs

41 строка
865 B
C#
Исходник Обычный вид История

2016-03-22 23:02:25 +03:00
using System.Diagnostics;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
2016-03-22 23:02:25 +03:00
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,
}
};
}
}
}