summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WinRT/WindowsBasePage.cs
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2017-01-31 18:24:19 (GMT)
committerRui Marinho <me@ruimarinho.net>2017-01-31 18:24:19 (GMT)
commit23d228039acc504049f6a5153f5839d4c714930a (patch)
treed2b78553068cea39fd41af50a27e7a84af4e0f0a /Xamarin.Forms.Platform.WinRT/WindowsBasePage.cs
parentb4fe4e0c902177ff7c175f691a5304d7c7ef518d (diff)
downloadxamarin-forms-23d228039acc504049f6a5153f5839d4c714930a.zip
xamarin-forms-23d228039acc504049f6a5153f5839d4c714930a.tar.gz
xamarin-forms-23d228039acc504049f6a5153f5839d4c714930a.tar.bz2
Fix crash in UWP design mode (#735)
Diffstat (limited to 'Xamarin.Forms.Platform.WinRT/WindowsBasePage.cs')
-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 3197321..e1700a8 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; }