-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
GitHub6926.cs
45 lines (44 loc) · 1.1 KB
/
GitHub6926.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
using System;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Controls.Issues
{
#if UITEST
[NUnit.Framework.Category(Core.UITests.UITestCategories.Github5000)]
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 6926, "[iOS] iOS - Using VoiceOver will crash when a ContentPage has no Content", PlatformAffected.iOS)]
public class GitHub6926 : TestContentPage
{
protected override void Init()
{
Content = new StackLayout
{
Children = {
new Label()
{
Text = "Enable VoiceOver and then click either:",
HorizontalTextAlignment = TextAlignment.Center,
VerticalTextAlignment = TextAlignment.Center,
},
new Button()
{
Text = "ContentPage without content (crash)",
Command = new Command(() =>
{
Navigation.PushAsync(new ContentPage());
})
},
new Button()
{
Text = "ContentPage with content (no crash)",
Command = new Command(() =>
{
Navigation.PushAsync(new ContentPage() { Content = new StackLayout() });
})
}
},
};
}
}
}