Navigation Window Based Application in WPF

Navigation Application in WPF

Navigation Applications are applications composed of many pages that look similarly to web applications.

For example a Retail ERP application may have various standalone pages, such as:

  1. Home Page
  2. Master Page
  3. Transaction Page

Here the Welcome Page is the home page from which you can navigate to a Master Page or a Transaction Page as shown in the following picture:

WPF window application page

We will now see how to create navigation applications using the Navigation Window Class.

Navigation Window

The Navigation Window class is derived from the Window class, so it inherits all the properties of Windows such as methods, properties and events. The navigation window provides backward and forward buttons for navigating to pages that we have visited before or have yet to visit.

Creating Navigation Paged Application

To create Navigation Window based applications, use a Navigation Window container instead of a Window container as shown in the following picture and the source is the property of the Navigation window and write the name of the page that you want to set as the home page as shown in the following picture:

xaml navigation window

In the code behind inherit the navigation window class as shown in the following picture:

navigation window class in WPF

Then, when you run the application, the application starts with the home page as shown in the following picture:

WPF window application

Summary

In this article I have shown how to create a navigation application in WPF. If you have any queries regarding this article then please do comment. Thank you for reading my article.

Up Next
    Ebook Download
    View all
    Learn
    View all