diff --git a/Directory.Build.props b/Directory.Build.props index b962f60ce..800a13527 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -13,7 +13,9 @@ Xamarin.Forms True - + + main + diff --git a/Xamarin.Forms.Platform.UAP/Platform.cs b/Xamarin.Forms.Platform.UAP/Platform.cs index d9278a21e..2045af858 100644 --- a/Xamarin.Forms.Platform.UAP/Platform.cs +++ b/Xamarin.Forms.Platform.UAP/Platform.cs @@ -334,6 +334,14 @@ namespace Xamarin.Forms.Platform.UWP else { RemovePage(previousPage); + + if(!modal && _modalBackgroundPage != null) + { + RemovePage(_modalBackgroundPage); + _modalBackgroundPage.Cleanup(); + _modalBackgroundPage.Parent = null; + } + _modalBackgroundPage = null; } @@ -673,4 +681,4 @@ namespace Xamarin.Forms.Platform.UWP e.Handled = BackButtonPressed(); } } -} \ No newline at end of file +}