using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Xamarin.Forms;

namespace NavigationPlay
{
    public class App : Application
    {
        private Page _mainPage = new NavigationPage(new MainPage());
        private Page _alternatePage = new NavigationPage(new AlternateWorldPage());

        public App()
        {
            MainPage = _mainPage;
        }

        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
        }

        public void Switch()
        {
            MainPage = MainPage == _mainPage ? _alternatePage : _mainPage;
        }
    }
}
