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:
- Home Page
- Master Page
- 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:
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:
In the code behind inherit the navigation window class as shown in the following picture:
Then, when you run the application, the application starts with the home page as shown in the following picture:
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.