-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Issue1356.cs
40 lines (36 loc) · 948 Bytes
/
Issue1356.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
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
using System.Collections.ObjectModel;
#if UITEST
using Xamarin.UITest;
using NUnit.Framework;
#endif
namespace Xamarin.Forms.Controls.Issues
{
#if UITEST
[NUnit.Framework.Category(Core.UITests.UITestCategories.Github5000)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 1356, "[UWP] A selected item in a ListView is not highlighted when constructing the page", PlatformAffected.UWP)]
public class Issue1356 : TestContentPage
{
ObservableCollection<string> items = new ObservableCollection<string>() { "A", "B", "C" };
ListView listView;
protected override void Init()
{
listView = new ListView
{
ItemsSource = items
};
Content = new StackLayout
{
Children =
{
listView,
new Label { Text = "Item 'B' should be highlighted when loading this page" }
}
};
listView.SelectedItem = items[1];
}
}
}