Navigation Pages in Xamarin Forms

Adam Murchison, 29 March 2018

Creating a Navigation Page

Navigation pages are a simple and the most common way of ‘navigating’ between different pages within Xamarin forms. A navigation page is still a Content Page; it does not take much to allow navigation. Navigation can be used to pass through parameters to different pages.

First off, you simply create a new instance of ‘NavigationPage’ and place the initial content page you want displayed. This is demonstrated below.

image

That is how you simply allow a content page to be able to navigate. To navigate to a new content page, you simply just use the below code snippet where “NextPage_Clicked” is the name of the event handler for a button press and “InitialPage” is the page you want to go to.

image

image

Disabling the Back Button and Navigation Bar

This is a very easy task and can only be done on navigation pages, this is done using the code below.

image

image

Some examples are as follows on my basketball manager application:

image

image