Chapter 4: 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 with the UI layer.
In this chapter, you will learn the following concepts:
- Understanding the basics of Dependency Injection (DI)
- Leveraging DI to expose view model classes to WinUI views
- Using MVVM and
x:Bind
to handle more UI events with event handlers in the view model - 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...