Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Null reference exception from this.LoadFromXaml() in compiler generated code

$
0
0

I have a view that has the UI defined in XAML, and is loaded automatically when the view is created and a call to InitializeComponent is made from the ctor:

public VideoContentView ()
{
    InitializeComponent ();
}

InitializeComponent method is a system generated code :

 public partial class VideoContentView : ContentView {
        private void InitializeComponent() {
            this.LoadFromXaml(typeof(VideoContentView));

        }

It seems I am randomly getting an null reference exception on the call to this.LoadFromXaml, for both iOS and for Android.

Any ideas what's going on here?

thanks,
Dennis


Viewing all articles
Browse latest Browse all 58056

Trending Articles