protected override async void OnAppearing() { try { exercises = new List <ExerciseViewModel>(await exerciseController.GetAllExerciseViewModelsAsync(null)); SortAndRefresh(); } catch (ApiException ex) { await DisplayAlert(AppResources.ErrorTitle, LogicHelper.ErrorMessage(ex.ErrorCode), AppResources.DialogOk); } catch (ConnectionException) { await DisplayAlert(AppResources.ErrorTitle, AppResources.ConnectionException, AppResources.DialogOk); } }