Creating and implementing the NavigationService class
In this section, we will take a look at how to create the NavigationService
class, which will inherit from our INavigationService
interface and implement the underlying instance methods that we declared within our interface class to help navigate between our ViewModels.
Let's start by creating the NavigationService
class for our TrackMyWalks
app by performing the following steps:
- Ensure that the
TrackMyWalks
solution is open within the Visual Studio for Mac IDE. - Next, right-click on the
Services
folder, and chooseAdd|New File...
from the pop-up menu. - Then, choose the
Empty Class
option under theGeneral
section and enterNavigationService
for the name of the class to be created, as shown in the following screenshot:

Creating the NavigationService Class
- Next, click on the
New
button to allow the wizard to proceed and create the new file, as shown in the preceding screenshot. Now that we have created ourNavigationService
class, we can proceed...