I have the following code in my Xamarin Forms project (it is from the official sample project of Syncfusion).
ViewModel:
[Preserve(AllMembers = true)]