SL4 AutoCompleteBox repeating filter results issue

懵懂的女人 提交于 2019-12-05 10:29:21

Also, the previous results are shown, but treated like they are non-existent right? I mean, selecting them don't change the autocompletebox's value? I'm having the same issue, got it after changing the style. In my situation it's because of ListBox's style. If you're using a custom style for listbox, try removing it & use the default style.

Steve

I ended up inheriting AutoCompleteBox capturing the Populated event and performing this hack.

var listBox = this.GetTemplateChild("Selector") as ListBox; 
var items = listBox.ItemsSource; 
listBox.ItemsSource = null; 
listBox.ItemsSource = items;

It fixed the problem, I'm sure there's a cleaner way of doing it but I didn't have time to mess around with it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!