diff options
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1259.cs')
-rw-r--r-- | Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1259.cs | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1259.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1259.cs new file mode 100644 index 00000000..681308ff --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1259.cs @@ -0,0 +1,112 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Xamarin.Forms.CustomAttributes; + +namespace Xamarin.Forms.Controls +{ + [Preserve (AllMembers=true)] + [Issue (IssueTracker.Github, 1259, "Layout issue with SwitchCell", PlatformAffected.Android)] + public class Issue1259 + : ContentPage + { + TableView _table; + public Issue1259() + { + StackLayout st = new StackLayout(); + st.HorizontalOptions = LayoutOptions.FillAndExpand; + st.VerticalOptions = LayoutOptions.FillAndExpand; + + _table = new TableView + { + Intent = TableIntent.Form, + Root = new TableRoot("") { + new TableSection + { + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new SwitchCell + { + Text = "SwitchCell:" + }, + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new SwitchCell + { + Text = "SwitchCell:" + }, + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new TextCell(), + new SwitchCell + { + Text = "SwitchCell:" + } + } + } + }; + + st.Children.Add(_table); + + Button next = new Button + { + Text = "Ok", + }; + next.Clicked +=next_Clicked; + + st.Children.Add(next); + + Content = st; + } + + void next_Clicked(object sender, EventArgs e) + { + var sw = _table.Root[0].OfType<SwitchCell>().First(); + sw.On = !sw.On; + } + } +} |