Created
July 22, 2014 22:44
-
-
Save jgold6/9b95b6ae67a32ffa2705 to your computer and use it in GitHub Desktop.
TableView1
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() | |
{ | |
return new NavigationPage (new ContentPage { | |
Content = 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 ViewCell { | |
View = new StackLayout { | |
HorizontalOptions = LayoutOptions.FillAndExpand, | |
VerticalOptions = LayoutOptions.FillAndExpand, | |
Children = { | |
new Label {Text = "IsWifi"} | |
} | |
} | |
}, | |
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 = "IsWifi", WidthRequest = 100.0, YAlign = TextAlignment.Center}, | |
new StackLayout { | |
HorizontalOptions = LayoutOptions.FillAndExpand, | |
VerticalOptions = LayoutOptions.FillAndExpand, | |
Orientation = StackOrientation.Vertical, | |
Children = {new Switch {IsToggled = false, IsEnabled = false}} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment