summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WinRT
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2017-01-31 13:24:19 -0500
committerRui Marinho <me@ruimarinho.net>2017-01-31 18:27:06 +0000
commit9b18ab9fb438a88c2be8a54aa3f567a9b1c398da (patch)
treec973ce01928a61bb30496ea7316f715d4ad382d6 /Xamarin.Forms.Platform.WinRT
parentd45134b28e1363d516367c9e3b7f1ab7798030b0 (diff)
downloadxamarin-forms-9b18ab9fb438a88c2be8a54aa3f567a9b1c398da.tar.gz
xamarin-forms-9b18ab9fb438a88c2be8a54aa3f567a9b1c398da.tar.bz2
xamarin-forms-9b18ab9fb438a88c2be8a54aa3f567a9b1c398da.zip
Fix crash in UWP design mode (#735)beta-2.3.4-pre2
Diffstat (limited to 'Xamarin.Forms.Platform.WinRT')
-rw-r--r--Xamarin.Forms.Platform.WinRT/WindowsBasePage.cs7
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; }