I need to update the title of an item of the ListView in master page, but once it is created, not let me change it:
How could I do this?
Show some example code:
public partial class MasterPageMain : ContentPage
{
private List<Items> masterPageItems;
public MasterPageMain() {
InitializeComponent();
masterPageItems = new List<Items>();
masterPageItems.Add(new Items {
Title = "Profile",
ImageSource = "profile",
TargetType = typeof(ProfilePage)
});
masterPageItems.Add(new Items {
Title = "Notifications",
ImageSource = "notifications",
TargetType = typeof(NotificationsPage)
});
listView.ItemsSource = masterPageItems;
test();
}
private async void test() {
await Task.Delay(1000);
masterPageItems.ElementAt(1).Title = "Notifications (5)";
}
}