Skip to content

Instantly share code, notes, and snippets.

@Artgerto
Created January 9, 2018 18:49
ContentPage с несколькими элементами UI
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);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment