Strange results in AutoSuggestBox in Windows Phone 8.1

前端 未结 2 682
天涯浪人
天涯浪人 2021-01-13 02:35

I am trying to use the standard AutoSuggestBox in a Windows Phone 8.1 XAML app, but it behaves really strangely.

In a simple demo, I have collection

2条回答
  •  长情又很酷
    2021-01-13 03:19

    Based on this blog post, it looks like what you're expecting (automatic filtering) isn't the case - instead, you need to hook into the TextChanged event and populate the Suggestions collection yourself.

    From the documentation:

    The app is notified when text has been changed by the user and is responsible for providing relevant suggestions for this control to display.

提交回复
热议问题