Freigeben über


INavigation.PushModalAsync Method

Definition

Overloads

PushModalAsync(Page)

Presents a Page modally.

PushModalAsync(Page, Boolean)

Presents a Page modally, with optional animation.

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

The Page to present modally.

Returns

System.Threading.Tasks.Task

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"

Applies to

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

The page to push.

animated
System.Boolean

Whether to animate the push.

Returns

System.Threading.Tasks.Task

Applies to