Advanced MVVM Concepts
After learning the basics of the MVVM pattern and its implementation in WinUI, it’s now time to build on that knowledge base to handle some more advanced techniques. Now, you will learn how to keep components loosely coupled and testable when adding new dependencies to the project.
Few modern applications have only a single page or window. There are MVVM techniques that can be leveraged to navigate between pages from a ViewModel
command without being coupled to the UI layer.
In this chapter, you will learn about the following concepts:
- Understanding the basics of Dependency Injection (DI)
- Leveraging DI to expose
ViewModel
classes to WinUI views - Using MVVM and
x:Bind
to handle additional UI events with event handlers in the ViewModel - Navigating between pages with MVVM and DI
By the end of this chapter, you will have a deeper understanding of the MVVM pattern and will know how to decouple your view models from any external...