Exemplo n.º 1
0
        private async void UpdateSearchSuggestions(bool focus = false)
        {
            if (string.IsNullOrWhiteSpace(SearchBox.Text))
            {
                HideSamplePicker();
                return;
            }

            var samples = (await Samples.FindSamplesByName(SearchBox.Text)).OrderBy(s => s.Name).ToArray();

            if (samples.Count() > 0)
            {
                ShowSamplePicker(samples);
                if (focus)
                {
                    SamplePickerGridView.Focus(FocusState.Keyboard);
                }
            }
            else
            {
                HideSamplePicker();
            }
        }
Exemplo n.º 2
0
 private async void UpdateSearchSuggestions()
 {
     _searchBox.ItemsSource = (await Samples.FindSamplesByName(_searchBox.Text)).OrderBy(s => s.Name);
 }