Xamarin View Fails To Bind To Model

MvxBind:Warning: 9.81 Unable to bind: source property source not found Property:SomeObject on null-object

One of the causes of the above error is mixing up the order of base.OnCreate and SetContentView calls in the Views OnCreate method.

Below is an example of the correct order.

protected override void OnCreate(Bundle bundle)
{
    base.OnCreate(bundle);
    SetContentView(Resource.Layout.MyLayout);
}
This entry was posted in Programming and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *