예제 #1
0
        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();
            }
        }
예제 #2
0
        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();
            }
        }