2019-01-04 22:08:48 +03:00
using Xamarin.Forms.CustomAttributes ;
2016-04-26 18:20:55 +03:00
using Xamarin.Forms.Internals ;
2016-03-22 23:02:25 +03:00
2019-01-04 22:08:48 +03:00
#if UITEST
using Xamarin.UITest ;
using NUnit.Framework ;
#endif
2018-11-07 01:00:08 +03:00
namespace Xamarin.Forms.Controls.Issues
2016-03-22 23:02:25 +03:00
{
[Preserve (AllMembers=true)]
[Issue (IssueTracker.Github, 1028, "ViewCell in TableView raises exception - root page is ContentPage, Content is TableView" ,PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]
2019-01-04 22:08:48 +03:00
public class Issue1028 : TestContentPage
2016-03-22 23:02:25 +03:00
{
// Issue1028, ViewCell with StackLayout causes exception when nested in a table section. This occurs when the app's root page is a ContentPage with a TableView.
2019-01-04 22:08:48 +03:00
protected override void Init ( )
2016-03-22 23:02:25 +03:00
{
2019-01-04 22:08:48 +03:00
Content = new TableView
{
Root = new TableRoot ( "Table Title" ) {
2016-03-22 23:02:25 +03:00
new TableSection ( "Section 1 Title" ) {
new ViewCell {
View = new StackLayout {
Children = {
new Label {
Text = "Custom Slider View:"
} ,
}
}
}
}
}
} ;
}
2019-01-04 22:08:48 +03:00
#if UITEST
[Test]
public void ViewCellInTableViewDoesNotCrash ( )
{
// If we can see this element, then we didn't crash.
RunningApp . WaitForElement ( "Custom Slider View:" ) ;
}
#endif
}
2016-03-22 23:02:25 +03:00
}