Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. Replace the code for loading the 1st Page in the solution
  2.  
  3. public App()
  4. {
  5. InitializeComponent();
  6.  
  7. //MainPage = new MainPage();
  8. MainPage = new NavigationPage(new Navigation.MainPage());
  9. }
  10.  
  11. ===============
  12.  
  13. In your XAML files
  14.  
  15. 1. Add a title in your content page
  16.  
  17. 2. in the Content Page Block provide a button
  18.  
  19. <Button Text="Go to 2nd Page" Clicked="Onbtn_Clicked"
  20. BackgroundColor="Blue"/>
  21.  
  22.  
  23.  
  24. In your cs File (underneath your xaml file)
  25.  
  26. private async void Onbtn_Clicked(object sender, EventArgs e)
  27. {
  28. await Navigation.PushAsync(new MainPage2());
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement