Created
September 28, 2014 02:07
-
-
Save YutaWatanabe/523ab028ccf6537b555b to your computer and use it in GitHub Desktop.
xamarin.forms sample
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
return new TabbedPage { | |
Children = { | |
new ContentPage { | |
Title = "Home", | |
Content = new StackLayout { | |
VerticalOptions = LayoutOptions.CenterAndExpand, | |
HorizontalOptions = LayoutOptions.CenterAndExpand, | |
Children = { | |
new Label { | |
Text = "Xamarin.Forms", | |
Font = Font.SystemFontOfSize (NamedSize.Large) | |
} | |
} | |
} | |
}, | |
new ContentPage { | |
Title = "Login", | |
Content = new StackLayout { | |
Spacing = 20, Padding = 50, | |
VerticalOptions = LayoutOptions.Center, | |
Children = { | |
new Entry { Placeholder = "Username" }, | |
new Entry { Placeholder = "Password", IsPassword = true }, | |
new Button { | |
Text = "Login", | |
TextColor = Color.White, | |
BackgroundColor = Color.FromHex("77D065") | |
} | |
} | |
} | |
}, | |
new ContentPage { | |
Title = "Settings", | |
Content = new TableView { | |
Intent = TableIntent.Settings, | |
Root = new TableRoot { | |
new TableSection (" ") { | |
new SwitchCell {Text = "Airplane Mode"}, | |
new SwitchCell {Text = "Notifications"} | |
}, | |
new TableSection (" ") { | |
new EntryCell { Label="Login", Placeholder = "username" } | |
, new EntryCell {Label="Password", Placeholder = "password" } | |
}, | |
new TableSection ("Silent") { | |
new SwitchCell {Text = "Vibrate", }, | |
new ViewCell { View = new Slider() } | |
}, | |
new TableSection ("Ring") { | |
new SwitchCell {Text = "New Voice Mail"}, | |
new SwitchCell {Text = "New Mail", On = true} | |
}, | |
} | |
} | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment