public async void OnLoginLogoutTap(object sender, System.EventArgs e) { IsPresented = false; UserData _userdata = AppStatics.LoadIsolatedData(); if (_userdata == null) { var stack = Detail.Navigation.NavigationStack; if (stack[stack.Count - 1].GetType() != typeof(VadodaraByFoot.View.LoginModule.LoginPage)) { Page displayPage = new VadodaraByFoot.View.LoginModule.LoginPage(); await Detail.Navigation.PushAsync(displayPage); } } else { AppStatics.ClearIsolatedData(); imgUser.Source = null; imgUser.HeightRequest = 0; lblUserName.HeightRequest = 0; lblUserNameEmailId.HeightRequest = 0; lblUserName.Text = null; lblUserNameEmailId.Text = null; await DisplayAlert(AppResources.AppResources.LMessage, AppResources.AppResources.LLogoutSucessful, AppResources.AppResources.LOk); } }