Catel.Services.NavigationHelper.PopModalAsync C# (CSharp) Method

PopModalAsync() public static method

Asynchronously dismisses the most recent modally presented T:Xamarin.Forms.Page.
public static PopModalAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        public static Task PopModalAsync()
        {
            return Application.Current.CurrentPage().Navigation.PopModalAsync();
        }
    }

Usage Example

 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 private static async Task CloseModalAsync()
 {
     if (Application.Current.GetActivePage() is ContentPage currentPage)
     {
         if (currentPage.Content is PopupLayout popupLayout && popupLayout.IsPopupActive)
         {
             await popupLayout.DismissPopupAsync();
         }
         else
         {
             await NavigationHelper.PopModalAsync();
         }
     }
All Usage Examples Of Catel.Services.NavigationHelper::PopModalAsync