From 53e1d99a751e7a9cb8ae3f67ac8f3630b2aea398 Mon Sep 17 00:00:00 2001 From: "E.Z. Hart" Date: Tue, 27 Sep 2016 07:50:02 -0600 Subject: Fix potential NRE accessing current application via Page.RealParent (#330) * Fix potential NRE accessing current application via Page.RealParent * Update Native Bindings Gallery to use MessagingCenter --- Xamarin.Forms.Platform.WinRT/Platform.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Xamarin.Forms.Platform.WinRT') diff --git a/Xamarin.Forms.Platform.WinRT/Platform.cs b/Xamarin.Forms.Platform.WinRT/Platform.cs index c16c896b..be146a9c 100644 --- a/Xamarin.Forms.Platform.WinRT/Platform.cs +++ b/Xamarin.Forms.Platform.WinRT/Platform.cs @@ -100,7 +100,7 @@ namespace Xamarin.Forms.Platform.WinRT _navModel.Push(newRoot, null); newRoot.NavigationProxy.Inner = this; SetCurrent(newRoot, false, true); - ((Application)newRoot.RealParent).NavigationProxy.Inner = this; + Application.Current.NavigationProxy.Inner = this; } public IReadOnlyList NavigationStack -- cgit v1.2.3