INavigation.PushModalAsync INavigation.PushModalAsync Method

Definition

Overloads

PushModalAsync(Page) PushModalAsync(Page)

Presents a Page modally.

PushModalAsync(Page, Boolean) PushModalAsync(Page, Boolean)

Presents a Page modally, with optional animation.

PushModalAsync(Page) PushModalAsync(Page)

Presents a Page modally.

public System.Threading.Tasks.Task PushModalAsync (Xamarin.Forms.Page page);
abstract member PushModalAsync : Xamarin.Forms.Page -> System.Threading.Tasks.Task
Parameters
page
Page Page

The Page to present modally.

Returns

An awaitable Task, indicating the PushModal completion.

Remarks

The following example shows PushModalAsync and PopModalAsync usage:


var modalPage = new ContentPage ();
await Navigation.PushModalAsync (modalPage);
Debug.WriteLine ("The modal page is now on screen");
var poppedPage = await Navigation.PopModalAsync ();
Debug.WriteLine ("The modal page is dismissed");
Debug.WriteLine (Object.ReferenceEquals (modalPage, poppedPage)); //prints "true"
        

PushModalAsync(Page, Boolean) PushModalAsync(Page, Boolean)

Presents a Page modally, with optional animation.

public System.Threading.Tasks.Task PushModalAsync (Xamarin.Forms.Page page, bool animated);
abstract member PushModalAsync : Xamarin.Forms.Page * bool -> System.Threading.Tasks.Task
Parameters
page
Page Page

The page to push.

animated
Boolean Boolean

Whether to animate the push.

Returns

Applies to