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

36 строки
789 B
C#

using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
#if UITEST
using NUnit.Framework;
using Xamarin.Forms.Core.UITests;
#endif
namespace Xamarin.Forms.Controls.Issues
{
[Preserve (AllMembers=true)]
[Issue (IssueTracker.Github, 1219, "Setting ToolbarItems in ContentPage constructor crashes app", PlatformAffected.iOS)]
public class Issue1219 : TestContentPage
{
const string Success = "Success";
public Issue1219 ()
{
Content = new Label { Text = Success };
ToolbarItems.Add(new ToolbarItem ("MenuItem", "", () => {
}));
}
protected override void Init() { }
#if UITEST
[Test]
public void ViewCellInTableViewDoesNotCrash()
{
// If we can see this element, then we didn't crash.
RunningApp.WaitForElement(Success);
}
#endif
}
}