twintechs / TwinTechsFormsLib

Apache License 2.0
193 stars 73 forks source link

Binding not working correctly with collections that use INotifyPropertyChanged #16

Open JoshuaNovak919 opened 9 years ago

JoshuaNovak919 commented 9 years ago

I have a list that has it's item source set to an ObservableCollection. Every minute I have to update one of the properties in the collection (it's time based), so the collection will update (collection uses INotifyPropertyChanged). This works with FastCell, except it seems every few times it jumps back. For example I had it just add 1 to an integer. it would say 1, 2, 3, 4, 3... etc. Once I switched back to normal cells they work perfectly. Any ideas what could cause this? I can throw together a sample if you'd like.

georgejecook commented 9 years ago

Yes. Give me a sample and il see what I can do.

Sent from my iPhone

On 13 Aug 2015, at 05:16, JoshuaNovak919 notifications@github.com wrote:

I have a list that has it's item source set to an ObservableCollection. Every minute I have to update one of the properties in the collection (it's time based), so the collection will update (collection uses INotifyPropertyChanged). This works with FastCell, except it seems every few times it jumps back. For example I had it just add 1 to an integer. it would say 1, 2, 3, 4, 3... etc. Once I switched back to normal cells they work perfectly. Any ideas what could cause this? I can throw together a sample if you'd like.

— Reply to this email directly or view it on GitHub.

JoshuaNovak919 commented 9 years ago

Here is a quick project (Xamarin Forms iOS) I made showing the problem. Watch the first row in particular, you'll notice it go 0, 1, 0, 1, etc, even though the debug window shows it's real value going up. Also, I used TrulyObservableCollection to get the items to refresh since for some reason using INotifyPropertyChanged with an ObservableCollection doesn't work with FastCell, even though it works with normal cells properly.

https://drive.google.com/file/d/0B68aZqcn2sxXWGxZNWlBdlBwN0U/view?usp=sharing