2016-03-22 23:02:25 +03:00
|
|
|
|
using System;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
using Xamarin.Forms.CustomAttributes;
|
2016-04-26 18:20:55 +03:00
|
|
|
|
using Xamarin.Forms.Internals;
|
2016-03-22 23:02:25 +03:00
|
|
|
|
|
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, 214, "TextCell DetailColor change not immediate", PlatformAffected.iOS)]
|
|
|
|
|
public class Issue214 : ContentPage
|
|
|
|
|
{
|
|
|
|
|
public Issue214 ()
|
|
|
|
|
{
|
2019-01-03 04:40:48 +03:00
|
|
|
|
var instructions = new Label { Text = "The text of each item should be visually distinct from the " +
|
|
|
|
|
"detail of each item. If both typefaces are identical, this test has failed." };
|
|
|
|
|
|
2016-03-22 23:02:25 +03:00
|
|
|
|
var items = Enumerable.Range (0, 50).Select (i => new TextCell {
|
2019-01-03 04:40:48 +03:00
|
|
|
|
Text = "Text" + i.ToString (),
|
|
|
|
|
Detail = "Detail" + i.ToString ()
|
2016-03-22 23:02:25 +03:00
|
|
|
|
}).ToList ();
|
|
|
|
|
|
|
|
|
|
var tableSection = new TableSection("First Section");
|
|
|
|
|
foreach (TextCell cell in items) {
|
|
|
|
|
tableSection.Add (cell);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var tableRoot = new TableRoot () {
|
|
|
|
|
tableSection
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var tableLayout = new TableView {
|
|
|
|
|
Root = tableRoot
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
tableLayout.Intent = TableIntent.Data;
|
2019-01-03 04:40:48 +03:00
|
|
|
|
Content = new StackLayout
|
|
|
|
|
{
|
|
|
|
|
Children = { instructions, tableLayout }
|
|
|
|
|
};
|
2016-03-22 23:02:25 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|