xamarin.android - How to notify change in ItemSource for repeater view Xamarin forms -
i'm trying implement itemsource in stacklayout in xamarin..fforms using repeaterview. example here.
now whenever there change in observablecollection in viewmodel, repeaterview class not able notify change there no inotifycollectionchanged property. how add property repeaterview class?
here's code:
private observablecollection<string> _username = new observablecollection<string>(); public observablecollection<string> username { { return _username; } set { setproperty(ref _username, value); } }
on button click i'm adding strings list:
username.add("user_1"); username.add("user_2"); username.add("user_3"); username.add("user_4");
you try this:
var names = new list<string>(); names.add("user1"); names.add("user2"); names.add("user3"); username = new observablecollection(names);
Comments
Post a Comment