private void OnConnectivityChanged(object sender, ConnectivityChangedEventArgs connectivityChangedEventArgs) { if (connectivityChangedEventArgs.IsConnected) { MainPage = new NetworkInfoPage(); } else { MainPage = new NoNetworkPage(); } }
public App() { CrossConnectivity.Current.ConnectivityChanged += OnConnectivityChanged; if (CrossConnectivity.Current.IsConnected) { MainPage = new NetworkInfoPage(); } else { MainPage = new NoNetworkPage(); } }