From 23d228039acc504049f6a5153f5839d4c714930a Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Tue, 31 Jan 2017 13:24:19 -0500 Subject: Fix crash in UWP design mode (#735) --- Xamarin.Forms.Platform.WinRT/WindowsBasePage.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Xamarin.Forms.Platform.WinRT/WindowsBasePage.cs b/Xamarin.Forms.Platform.WinRT/WindowsBasePage.cs index 31973212..e1700a85 100644 --- a/Xamarin.Forms.Platform.WinRT/WindowsBasePage.cs +++ b/Xamarin.Forms.Platform.WinRT/WindowsBasePage.cs @@ -14,8 +14,11 @@ namespace Xamarin.Forms.Platform.WinRT { public WindowsBasePage() { - Windows.UI.Xaml.Application.Current.Suspending += OnApplicationSuspending; - Windows.UI.Xaml.Application.Current.Resuming += OnApplicationResuming; + if (!DesignMode.DesignModeEnabled) + { + Windows.UI.Xaml.Application.Current.Suspending += OnApplicationSuspending; + Windows.UI.Xaml.Application.Current.Resuming += OnApplicationResuming; + } } protected Platform Platform { get; private set; } -- cgit v1.2.3