I'm building a Xamarin.Forms proof of concept app for a client. I have an order screen with a corresponding order class that implements INotifyPropertyChanged. I'm using data binding on a list view and as items are added to the order, PropertyChanged is fired and the data bound list view and subtotals are updated. After adding a couple of items to the order the following exception is thrown.
[MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] System.InvalidOperationException: Operation is not valid due to the current state of the object
[MonoDroid] at Xamarin.Forms.Platform.Android.BaseViewRenderer.GetChildDrawingOrder (int,int)
[MonoDroid] at Android.Views.ViewGroup.n_GetChildDrawingOrder_II (intptr,intptr,int,int) [0x00009] in /Users/builder/data/lanes/1131/62e09eb0/source/monodroid/src/Mono.Android/platforms/android-15/src/generated/Android.Views.ViewGroup.cs:2483
[MonoDroid] at (wrapper dynamic-method) object.c79eedd2-8459-4a78-abe8-eb8cae4874eb (intptr,intptr,int,int)
In general, what would cause the InvalidOperationException to be thrown? Is there a chance that its a threading issue? Does the data binding capabilities of Xamarin.Forms ensure that all UI updates triggered by PropertyChanged events are performed on the UI thread?
Any ideas would be appreciated; unfortunately I can't send the source because of IP concerns; may be able to take some time and create a sample if we can't make any progress.
thanks
Mark