-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Issue1567.cs
46 lines (42 loc) · 1.02 KB
/
Issue1567.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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, 1567, "NRE in NavigationProxy.set_Inner", PlatformAffected.iOS)]
public class Issue1567
: ContentPage
{
public Issue1567()
{
Title = "Test";
var label = new Label { Text = "Whatever" };
ToolbarItems.Add(new ToolbarItem("Modal", null, async () =>
{
var cp2 = new ContentPage()
{
Title = "Modal",
Content = new Label() { Text = "Second screen" },
};
//var np2 = new NavigationPage(cp2) { Title = "Modal" };
try
{
await Navigation.PushModalAsync(cp2);
}
catch (InvalidOperationException ex)
{
label.Text = "Exception properly thrown: " + ex.Message;
}
}));
Content = label;
}
}
}