INavigation.PushAsync INavigation.PushAsync Method

Definition

Overloads

PushAsync(Page) PushAsync(Page)

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

PushAsync(Page, Boolean) PushAsync(Page, Boolean)

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

PushAsync(Page) 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 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 Xamarin.Forms.INavigation.Push and Xamarin.Forms.INavigation.Pop 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"
                            

PushAsync(Page, Boolean) 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 Page

The page to push.

animated
Boolean Boolean

Whether to animate the push.

Returns

Applies to