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

Getting NullReferenceException while navigating to popuppage

$
0
0

MessagingCenter.Unsubscribe(this, "CaptureFormName");
MessagingCenter.Subscribe(this, "CaptureFormName", async x =>
{
var bindingContext = new PageViewModel
{ ScreenName = "StaticName" };
await Application.Current.MainPage.Navigation.PushAsync(new PagePopUp()
{ CloseWhenBackgroundIsClicked = false, BindingContext = bindingContext });
});
Above is my code and i am getting the bellow Exception
{System.NullReferenceException: Object reference not set to an instance of an object.
at Project.PageName+<<-ctor>b__1_0>d.MoveNext () [0x0002f] in
ProjectPath\PageName.xaml.cs:26 }
Thanks in Advance.


Viewing all articles
Browse latest Browse all 77050

Trending Articles