Created
July 22, 2014 22:49
-
-
Save jgold6/a0463fc99da069a0efcf to your computer and use it in GitHub Desktop.
TableView2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Page GetMainPage() | |
{ | |
// TableView2 in code | |
return new NavigationPage (new ContentPage { | |
Content = new StackLayout { | |
Children = { | |
new TableView { | |
Intent = TableIntent.Settings, | |
Root = new TableRoot ("Settings") { | |
new TableSection ("Notifications") { | |
new ViewCell { | |
View = new StackLayout { | |
Padding = new Thickness(20.0, 0.0, 0.0, 0.0), | |
VerticalOptions = LayoutOptions.Start, | |
Orientation = StackOrientation.Horizontal, | |
Children = { | |
new Label {Text = "Notifications", WidthRequest = 100.0, YAlign = TextAlignment.Center}, | |
new StackLayout {HorizontalOptions = LayoutOptions.EndAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Orientation = StackOrientation.Vertical}, | |
new Switch{IsToggled = true} | |
} | |
} | |
}, | |
new ViewCell { | |
View = new StackLayout { | |
VerticalOptions = LayoutOptions.Start, | |
Orientation = StackOrientation.Horizontal, | |
Children = { | |
new Label {Text = "Max", WidthRequest = 100.0, YAlign = TextAlignment.Center}, | |
new StackLayout {HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Orientation = StackOrientation.Vertical}, | |
new Entry() | |
} | |
} | |
} | |
}, | |
new TableSection ("Network") { | |
new TextCell {Text="To change a setting below, please change on your device.", IsEnabled = false}, | |
new SwitchCell {Text = "test1", On = true}, | |
new SwitchCell {Text = "test2", On = true}, | |
new SwitchCell {Text = "test3", On = true}, | |
new SwitchCell {Text = "test4", On = true} | |
} | |
} | |
} | |
} | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment