I have been stuck with this for couple of days. Basically what I am trying to do is assign the values to the property in the ViewModel from the BaseViewModel.
In my BaseViewModel I have the following code:
var abc1 = this.GetType();
var method =
typeof(JsonConvert).GetTypeInfo().GetDeclaredMethods("DeserializeObject")
.FirstOrDefault(m => m.IsGenericMethod == true && m.GetParameters().Count() == 1);
MethodInfo generic = method.MakeGenericMethod(abc1);
var pageData = generic.Invoke(null, new[] { pageState.PageData });
Where var PageData, is the type of the current viewmodel that is active. When this line gets executed, I can see that the setters of all my properties in ViewModel gets called too, and I see the right value in it. But as soon as the execution moves the next line, the values set to default ones, and my binding does not work.
I am using the above code in a Xamarin forms project. I have made a post earlier , but I guess I did not explain the issue correctly.