diff options
author | Jason Smith <jason.smith@xamarin.com> | 2017-01-31 13:24:19 -0500 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2017-01-31 18:24:19 +0000 |
commit | 23d228039acc504049f6a5153f5839d4c714930a (patch) | |
tree | d2b78553068cea39fd41af50a27e7a84af4e0f0a | |
parent | b4fe4e0c902177ff7c175f691a5304d7c7ef518d (diff) | |
download | xamarin-forms-23d228039acc504049f6a5153f5839d4c714930a.tar.gz xamarin-forms-23d228039acc504049f6a5153f5839d4c714930a.tar.bz2 xamarin-forms-23d228039acc504049f6a5153f5839d4c714930a.zip |
Fix crash in UWP design mode (#735)
-rw-r--r-- | Xamarin.Forms.Platform.WinRT/WindowsBasePage.cs | 7 |
1 files 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; } |