Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public App ()
- {
- // The root page of your application
- var layout = new StackLayout
- {
- VerticalOptions = LayoutOptions.Center,
- Children = {
- new Label {
- HorizontalTextAlignment = TextAlignment.Center,
- Text = "Welcome to Xamarin Forms!"
- }
- }
- };
- MainPage = new ContentPage
- {
- Content = layout
- };
- Button button = new Button
- {
- Text = "Click Me"
- };
- button.Clicked += async (s, e) => {
- await MainPage.DisplayAlert("Alert", "You clicked me", "OK");
- };
- layout.Children.Add(button);
- }
Add Comment
Please, Sign In to add comment