File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Microsoft.Toolkit.Uwp.UI.Controls.Input/RichSuggestBox Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -561,10 +561,10 @@ private async Task RequestSuggestionsAsync(ITextRange range = null)
561561 CancellationTokenSource = tokenSource
562562 } ;
563563
564+ var cancellationToken = tokenSource . Token ;
565+ var eventArgs = new SuggestionRequestedEventArgs { QueryText = query , Prefix = prefix } ;
564566 if ( SuggestionRequested != null )
565567 {
566- var cancellationToken = tokenSource . Token ;
567- var eventArgs = new SuggestionRequestedEventArgs { QueryText = query , Prefix = prefix } ;
568568 try
569569 {
570570 await SuggestionRequested . InvokeAsync ( this , eventArgs , cancellationToken ) ;
@@ -573,12 +573,12 @@ private async Task RequestSuggestionsAsync(ITextRange range = null)
573573 {
574574 return ;
575575 }
576+ }
576577
577- if ( ! eventArgs . Cancel )
578- {
579- _suggestionChoice = 0 ;
580- ShowSuggestionsPopup ( _suggestionsList ? . Items ? . Count > 0 ) ;
581- }
578+ if ( ! eventArgs . Cancel )
579+ {
580+ _suggestionChoice = 0 ;
581+ ShowSuggestionsPopup ( _suggestionsList ? . Items ? . Count > 0 ) ;
582582 }
583583
584584 tokenSource . Cancel ( ) ;
You can’t perform that action at this time.
0 commit comments