summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue260.cs
blob: d9ce4502c3c07c2cd30409e1bc79147f687ffd70 (plain)
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
using System;
using System.Linq;

using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;

namespace Xamarin.Forms.Controls
{
	[Preserve (AllMembers=true)]
	[Issue (IssueTracker.Github, 260, "Layout issue for TableView", PlatformAffected.WinPhone)]
	public class Issue260 : ContentPage
	{
		// Issue: #229
		// ToolbarItems broken on Android

		// Doesn't seem to working on All Platforms

		public Issue260 ()
		{
			var items = Enumerable.Range (0, 50).Select (i => new TextCell {
				Text = i.ToString (),
				Detail = i.ToString ()
			}).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;
			Content = tableLayout;
		}
	}
}