INavigation.PushAsync Method

Definition

Overloads

PushAsync(Page)

Asynchronously adds a Page to the top of the navigation stack.

PushAsync(Page, Boolean)

Asynchronously adds a Page to the top of the navigation stack, with optional animation.

PushAsync(Page)

Asynchronously adds a Page to the top of the navigation stack.

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

Parameters

page
Page

The Page to be pushed on top of the navigation stack.

Returns

A task that represents the asynchronous push operation.

Remarks

The following example shows PushAsync and PopAsync() usage:

var newPage = new ContentPage ();
await Navigation.PushAsync (newPage);
Debug.WriteLine ("the new page is now showing");
var poppedPage = await Navigation.PopAsync ();
Debug.WriteLine ("the new page is dismissed");
Debug.WriteLine (Object.ReferenceEquals (newPage, poppedPage)); //prints "true"

Applies to

PushAsync(Page, Boolean)

Asynchronously adds a Page to the top of the navigation stack, with optional animation.

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

Parameters

page
Page

The page to push.

animated
Boolean

Whether to animate the push.

Returns

Applies to