public async void OnSignOutTapped(object sender, EventArgs e) { try { this.IsPresented = false; if (Application.Current.Properties.ContainsKey("Current_User")) { Application.Current.Properties.Remove("Current_User"); } await Navigation.PushModalAsync(new NavigationPage(new MainPage())); CacheManager.RemoveAllSyncEvaluations(); if (CrossConnectivity.Current.IsConnected) { await StepOutManager.SyncAllFichesBO(); } await Application.Current.SavePropertiesAsync(); StepOutManager.CurrentUser = ""; BluetoothManager bluetoothManager = new BluetoothManager(); IDevice device = CacheProvidor.Get <IDevice>("device"); if (device != null) { await bluetoothManager.Disconnect(device, CrossBluetoothLE.Current.Adapter); } //await Navigation.PushModalAsync(new NavigationPage(new MainPage())); //detailPage.Title = "Profile"; //detailPage.Content = new ProfileView(); } catch (Exception ex) { await StepOutManager.Writelog(ex); await DisplayAlert("Fout", "Er is iets misgelopen bij het uitloggen, als deze fout zich blijft voordoen neemt men best contact op met de support.", "OK"); } }