How can we improve the Windows dev platform?

Autosuggestbox AutoSuggestionBoxTextChangeReason is always UserInput.

[UWP] While following the tutorial at the Microsoft Docs on how to proper create an AutoSuggestBox, when using the SuggestionChosen event handler to change the Text property of the AutoSuggestBox, the TextChanged event is raised with the AutoSuggestionBoxBoxTextChangeReason set to UserInput, even though it was changed via code. The tutorial says it that it should raise it as ProgrammaticChange, and yet that doesn't happen.
Currently on Windows 10 Pro Build 18309 SDK Version 10.0.17763.132 using Visual Studio 2019 Version 16.0.0 Preview 1.1.

2 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Bruno Blanes shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Miguel Ramos [MSFT] [XAML Program Manager] commented  ·   ·  Flag as inappropriate

        Hi there! I couldn't repro with the W10 insider build 18327. When the text is changed inside of the SuggestionChosen event, the following TextChanged event is fired within the SuggestionChosen enum value in the AutoSuggestionBoxBoxTextChangeReason parameter. Perhaps there is bug on the docs. If so, can you point us to the doc, please?

      • Matt Grove commented  ·   ·  Flag as inappropriate

        Sorry -- I take my previous comment back. The TextChanged event is fired well after you change the text in such a way that you can't "bracket" it with the ignore flag.

      • Matt Grove commented  ·   ·  Flag as inappropriate

        I've experienced the same problem. I ended up setting a Boolean flag in my handler code in order to ignore the TextChanged event when I'm setting the control's Text (ignore = true; set text; ignore = false).

      Feedback and Knowledge Base