Catel.Services.UIVisualizerService.CloseModal C# (CSharp) Method

CloseModal() private static method

private static CloseModal ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        private static async Task CloseModal()
        {
            var currentPage = Application.Current.CurrentPage() as ContentPage;
            if (currentPage != null)
            {
                var popupLayout = currentPage.Content as PopupLayout;
                if (popupLayout != null && popupLayout.IsPopupActive)
                {
                    await popupLayout.DismissPopup();
                }
                else
                {
                    await NavigationHelper.PopModalAsync();
                }
            }
        }