/// <summary> /// Handle selection of a search suggestion /// </summary> private async void SuggestionSource_RowSelected(object sender, TableRowSelectedEventArgs <string> e) { // Update the search bar with the selected item _searchBar.Text = e.SelectedItem; try { // Commit the search with the viewmodel await _viewModel.CommitSearchAsync(_searchBar.Text); } catch (Exception ex) { ErrorLogger.Instance.LogException(ex); } // Remove focus from the search bar, which will hide the keyboard. // This has to be done last, otherwise search will be canceled. _searchBar.ResignFirstResponder(); }