I'm making an app where the order and properties of the views on a page can be changed. I'm trying to serialize the StackLayout that contains the views.
I've tried 3 different serialization techniques, all of which have failed with the following exceptions:
System.InvalidOperationException: There was an error reflecting type 'AppProject.MyApp'. occurred
Newtonsoft.Json.JsonSerializationException: Self referencing loop detected for property 'ParentView' with type 'Xamarin.Forms.StackLayout'. Path 'Pages.stack.Children'.
System.Runtime.Serialization.SerializationException: Type 'AppProject.MyApp' in Assembly 'AppProject, Version=220.127.116.11, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
Can someone please recommend a solution?