Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Modernizing Your Windows Applications with the Windows App SDK and WinUI

You're reading from   Modernizing Your Windows Applications with the Windows App SDK and WinUI Expand your desktop apps to support new features and deliver an integrated Windows 11 experience

Arrow left icon
Product type Paperback
Published in Apr 2022
Publisher Packt
ISBN-13 9781803235660
Length 514 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Marc Plogas Marc Plogas
Author Profile Icon Marc Plogas
Marc Plogas
Matteo Pagani Matteo Pagani
Author Profile Icon Matteo Pagani
Matteo Pagani
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Section 1: Basic Concepts
2. Chapter 1: Getting Started with the Windows App SDK and WinUI FREE CHAPTER 3. Section 2: Modernization Journey
4. Chapter 2: The Windows App SDK for a Windows Forms Developer 5. Chapter 3: The Windows App SDK for a WPF Developer 6. Chapter 4: The Windows App SDK for a UWP Developer 7. Chapter 5: Designing Your Application 8. Chapter 6: Building a Future-Proof Architecture 9. Section 3: Integrating Your App with the Windows Ecosystem
10. Chapter 7: Migrating Your Windows Applications to the Windows App SDK and WinUI 11. Chapter 8: Integrating Your Application with the Windows Ecosystem 12. Chapter 9: Implementing Notifications 13. Chapter 10: Infusing Your Apps with Machine Learning Using WinML 14. Section 4: Distributing Your Application
15. Chapter 11: Publishing Your Application 16. Chapter 12: Enabling CI/CD for Your Windows Applications 17. Assessments 18. Other Books You May Enjoy

Managing navigation with the MVVM pattern

We explored navigation in Chapter 5, Designing Your Application, and we have learned that it's a critical component of a Windows application. Especially if you're building enterprise applications, it's very likely that you will have multiple pages and the various interactions will lead the user to move from one to another. However, it's also one of the most challenging features to implement when you start adopting the MVVM pattern. The reason is that the goal of the pattern is to decouple the UI from the business logic; however, this creates a fracture in this case. The actions performed by the user are managed by the ViewModel, while navigation is managed in the View layer by using the Frame class to trigger the navigation and by subscribing to events such as OnNavigatedTo() and OnNavigateFrom() to manage the life cycle of a page.

There are multiple solutions to this challenge, but the most common one is based on the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime