C
C#2y ago
Down

❔ xamarin listview doesnt update

hi so i have a weird problem in my code behind i have 2 methods
private void SearchList(object sender, TextChangedEventArgs e)
{
listView.ItemsSource = SearchService.GetSearches(e.NewTextValue);
}

private void Refresh(object sender, EventArgs e)
{
listView.ItemsSource = SearchService.GetSearches();
listView.EndRefresh();
}
private void SearchList(object sender, TextChangedEventArgs e)
{
listView.ItemsSource = SearchService.GetSearches(e.NewTextValue);
}

private void Refresh(object sender, EventArgs e)
{
listView.ItemsSource = SearchService.GetSearches();
listView.EndRefresh();
}
one is called when searching and one is called when refreshing all i do in both is just reassign the ItemSource to new Items the weird part is that when i refresh nothing updates on screen while when i search and remove the text from search bar it is updated after so basically looks like listView.ItemsSource = SearchService.GetSearches(e.NewTextValue); this line works while this does not listView.ItemsSource = SearchService.GetSearches();
2 Replies
Down
DownOP2y ago
i can provide more code of xaml or how SearchService is coded when you need it
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server