Skip to content

Instantly share code, notes, and snippets.

@jimmgarrido
Created July 6, 2017 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimmgarrido/9a259c445d74273795bae8f2155915de to your computer and use it in GitHub Desktop.
Save jimmgarrido/9a259c445d74273795bae8f2155915de to your computer and use it in GitHub Desktop.
b57965
public partial class MainPage : ContentPage
{
Entry entry;
StackLayout stacklayout;
Button nextpage;
public MainPage()
{
InitializeComponent();
entry = new Entry();
stacklayout = new StackLayout();
nextpage = new Button() { Text="Next Page"};
nextpage.Clicked += Nextpage_Clicked;
stacklayout.Children.Add(nextpage);
this.Content = stacklayout;
}
protected override void OnAppearing()
{
base.OnAppearing();
stacklayout.Children.Insert(0, entry);
}
private void Nextpage_Clicked(object sender, EventArgs e)
{
SecondPage secondpage = new SecondPage(entry);
Navigation.PushAsync(secondpage);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment