示例#1
0
 void OnChanged(object sender, ConnectivityChangedEventArgs e)
 {
     if (e.IsConnected)
     {
         MainPage = new NetworkViewPage();
     }
     else
     {
         MainPage = new NoNetworkPage();
     }
 }
示例#2
0
        public App()
        {
            InitializeComponent();
            var nav = new NavigationPage(new MainPage());



            if (CrossConnectivity.Current.IsConnected)
            {
                MainPage = new NetworkViewPage();
            }
            else
            {
                MainPage = new NoNetworkPage();
            }
        }