-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Bugzilla51642.xaml.cs
50 lines (46 loc) · 1.07 KB
/
Bugzilla51642.xaml.cs
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
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Controls.Issues
{
#if UITEST
[NUnit.Framework.Category(Core.UITests.UITestCategories.Bugzilla)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 51642, "Delayed BindablePicker UWP", PlatformAffected.All)]
public partial class Bugzilla51642 : ContentPage
{
#if APP
public Bugzilla51642 ()
{
InitializeComponent ();
LoadDelayedVM();
BoundPicker.SelectedIndexChanged += (s, e) =>
{
SelectedItemLabel.Text = BoundPicker.SelectedItem.ToString();
};
}
public async void LoadDelayedVM()
{
await Task.Delay(1000);
Device.BeginInvokeOnMainThread(() => BindingContext = new Bz51642VM());
}
#endif
}
[Preserve(AllMembers = true)]
class Bz51642VM
{
public IList<string> Items
{
get
{
return new List<String> { "Foo", "Bar", "Baz" };
}
}
}
}