private async void UpdateSearchSuggestions() { if (string.IsNullOrWhiteSpace(SearchBox.Text)) { HideSamplePicker(); return; } var samples = (await Samples.FindSample(SearchBox.Text)).OrderBy(s => s.Name).ToArray(); if (samples.Count() > 0) { ShowSamplePicker(samples); } else { HideSamplePicker(); } }
private async void UpdateSearchSuggestions(bool focus = false) { if (string.IsNullOrWhiteSpace(SearchBox.Text)) { HideSamplePicker(); return; } var samples = (await Samples.FindSample(SearchBox.Text)).OrderBy(s => s.Name).ToArray(); if (samples.Count() > 0) { ShowSamplePicker(samples); if (focus) { SamplePickerGridView.Focus(FocusState.Keyboard); } } else { HideSamplePicker(); } }