Exemplo n.º 1
0
        private void AutoSuggestBox_QuerySubmitted(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxQuerySubmittedEventArgs e)
        {
            if (e.ChosenSuggestion != null)
            {
                // User selected an item from the suggestion list, take an action on it here.
                VM.PerformSearchCommand.Execute(inputBox.Text);
                List <string> suggestionList = new List <string>();
                suggestionList.Add(inputBox.Text);

                inputBox.ItemsSource = suggestionList;
            }
            else
            {
                // User hit Enter from the search box. Use args.QueryText to determine what to do.
                inputBox.Text = "";
            }
        }
Exemplo n.º 2
0
 private void AutoSuggestBox_QuerySubmitted(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxQuerySubmittedEventArgs args)
 {
     if (args.ChosenSuggestion != null)
     {
         // O usuário selecionou um item da lista de sugestões, execute uma ação sobre ele aqui.
         if (args.ChosenSuggestion != null)
         {
             pedidoViewModel.ClienteSelected = (ClientesModel)args.ChosenSuggestion;
         }
         else
         {
             pedidoViewModel.ClienteSelected = null;
         }
     }
     else
     {
         // O usuário pressiona Enter na caixa de pesquisa. Use args.QueryText para determinar o que fazer.
         FiltrarClientes(args.QueryText, sender);
     }
 }
Exemplo n.º 3
0
 private void AutoSuggestBox_QuerySubmitted(object sender, dotMorten.Xamarin.Forms.AutoSuggestBoxQuerySubmittedEventArgs e)
 {
 }
 private void AutoSuggestBox_QuerySubmitted(object sender, XAutoSuggestBoxQuerySubmittedEventArgs e)
 {
     Element?.RaiseQuerySubmitted(e.QueryText, e.ChosenSuggestion);
 }
 private void AutoSuggestBox_QuerySubmitted(object sender, XAutoSuggestBoxQuerySubmittedEventArgs e)
 {
     MessagingCenter.Send(Element, "AutoSuggestBox_" + nameof(AutoSuggestBox.QuerySubmitted), (e.QueryText, e.ChosenSuggestion));
 }