List<> is not updating

some1some1 Member ✭✭✭
edited August 13 in Xamarin.Forms

I have listview where i have name, then a stepper to take count . So i go to next page then if i come back and click stepper to increase count that is affected in OnPropertyChanged but not updating in List<>.

Answers

  • FaizalSaidaliFaizalSaidali USMember ✭✭✭

    @some1, Try with TwoWay Binding mode. If it's not resolve your issue, please put here your listview control binding code and collection implementation.

  • JarvanJarvan Member, Xamarin Team Xamurai

    Change the List to an ObservableCollection. And the model class should extend INotifyPropertyChanged. Update code in
    Stepper's ValueChanged event.

    private void _stepper_ValueChanged(object sender, ValueChangedEventArgs e)
    {
        ...
        models.Add(model);
    }
    

Sign In or Register to comment.