ListView Itemssource property is not updating changes to an observablecollection

ThekidThekid INMember ✭✭

In the following code im binding Records form a viewmodel , which is using an observablecollection , im also raising the inotifypropertychange, , now i have a button setup which uses the navigation.pushasync method to go to a new page , over there im updating the database Records , i have created a listview in this new page and used the same binding shown here to bind the Records , whenever i add something it updates , but if i press the back button and come back to this EntryTabPage the binding doesnt update , it only updates if i close the app fully and restart it the data is shown.

I want this listview to be updated not sure how to do it , i have tried using the onappearing and typing in the Listviewname.itemssource=Records; but this is showing an error "this does not exist in the current context" any help in the right direction would be appreciated.

       namespace Bunk_Master
        public partial class EntryPageTab1 : ContentPage

            public EntryPageTab1()
                BindingContext = new ClassViewModel();

                addclassbutton.Clicked += async (object sender, EventArgs e) =>
                     await this.Navigation.PushAsync(new AddClass());


                  protected override void OnAppearing()




This is the xaml

            <ContentPage xmlns=""
                <StackLayout x:Name="stacklayout">
                    <ListView ItemsSource="{Binding Records}"
                                <TextCell Text="{Binding}">

                    <Button Text="new" 



Best Answer


Sign In or Register to comment.