Skip to content

Instantly share code, notes, and snippets.

@mako34
Created February 17, 2017 07:19
Show Gist options
  • Select an option

  • Save mako34/82eb5ed4c1b7a07332181617747a7dc2 to your computer and use it in GitHub Desktop.

Select an option

Save mako34/82eb5ed4c1b7a07332181617747a7dc2 to your computer and use it in GitHub Desktop.
UI elements in App.xaml
***
{
public partial class App : Application
{
public App()
{
//open an actual form template...
//InitializeComponent();
//MainPage = new MainPage();
//a form straight
Button btn = new Button();
btn.Text = "di butons";
MainPage = new ContentPage
{
Content = new StackLayout
{
VerticalOptions = LayoutOptions.Center,
Children = {
new Label {
HorizontalTextAlignment = TextAlignment.Center,
Text = "tkt ss9"
},
btn
}
}
};
btn.Clicked += (sender, e) => {
btn.Text = "tapeado";
};
}
protected override void OnStart()
{
// Handle when your app starts
}
protected override void OnSleep()
{
// Handle when your app sleeps
}
protected override void OnResume()
{
// Handle when your app resumes
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment