Reputation: 475
I am learning Xamarin, I have a listview with Items "A","B","C".
When I click on one Item I got a display alert that says Item "A was tapped". When I click again on Item A nothing happen but something happens if I tap the Item "B" or "C" ("B was tapped" or "C was tapped")
My question is, how can refresh my listview in order to tap waterver I want the Item A ?
I have used Device.BeginInvokeOnMainThread(() => });
but it is not helping
Here is the code :
public void ListviewLanguageRefresh1()
{
var dictionary = keys.Zip(values, (k, v) => new { Key = k, Value = v })
.ToDictionary(x => x.Key, x => x.Value); // contaning Items A,B,C
Device.BeginInvokeOnMainThread(() =>
{
//Trying to refresh the listview
ListViewlingueelanguages.ItemsSource = dictionary;
});
}
Upvotes: 0
Views: 130
Reputation: 89082
from the docs
You didn't actually post the code you are using for "tapped" but I assume you are using ItemSelected
. You can either switch to ItemTapped
, or clear the SelectedItem
property in your ItemSelected
handler
Upvotes: 1