INavigation.PushAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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
- System.Boolean
Whether to animate the push.