Last active
April 20, 2017 23:15
-
-
Save yuka1984/f0ba23376346df18c501aeab04d62804 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Xamarin.Forms; | |
namespace AndroindIndicator | |
{ | |
public partial class AndroindIndicatorPage : ContentPage | |
{ | |
void Off_Clicked(object sender, System.EventArgs e) | |
{ | |
this.IsBusy = false; | |
} | |
void On_Clicked(object sender, System.EventArgs e) | |
{ | |
this.IsBusy = true; | |
} | |
public AndroindIndicatorPage() | |
{ | |
InitializeComponent(); | |
On.Clicked += On_Clicked; | |
Off.Clicked += Off_Clicked; | |
Next.Clicked += NextOnClicked; | |
} | |
private void NextOnClicked(object sender, EventArgs eventArgs) | |
{ | |
MessagingCenter.Send(this, "Next"); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Xamarin.Forms; | |
namespace AndroindIndicator | |
{ | |
public partial class App : Application | |
{ | |
public App() | |
{ | |
InitializeComponent(); | |
MainPage = new NavigationPage(new AndroindIndicatorPage(){ Title = "Page1"}); | |
MessagingCenter.Subscribe<AndroindIndicatorPage>(this, "Next", o => | |
{ | |
var nav = MainPage as NavigationPage; | |
nav?.PushAsync(new AndroindIndicatorPage() {Title = $"Page{nav.Navigation.NavigationStack.Count}"}); | |
}); | |
} | |
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