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

PushModalAsync() public static method

Presents a T:Xamarin.Forms.Page modally.
public static PushModalAsync ( ContentPage contentPage ) : System.Threading.Tasks.Task
contentPage ContentPage The page to present
return System.Threading.Tasks.Task
        public static Task PushModalAsync(ContentPage contentPage)
        {
            return Application.Current.CurrentPage().Navigation.PushModalAsync(contentPage);
        }

Usage Example

Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="viewModel"></param>
        /// <param name="completedProc"></param>
        /// <param name="contentLayout"></param>
        /// <returns></returns>
        private async Task DisplayUsingNavigationAsync(IViewModel viewModel, EventHandler <UICompletedEventArgs> completedProc, StackLayout contentLayout)
        {
            var contentPage = new ContentPage
            {
                Content = contentLayout
            };

            _callbacks[contentPage]        = new Tuple <IViewModel, EventHandler <UICompletedEventArgs> >(viewModel, completedProc);
            contentPage.BackButtonPressed += OnBackButtonPressed;
            await NavigationHelper.PushModalAsync(contentPage);
        }