Creating MVVM-Friendly Controls
Up to this point, we’ve navigated through a wide spectrum of topics in MVVM and .NET MAUI – from the fundamental design pattern to data binding, navigation, and even working with remote data. Now, let’s dig into another important topic – custom controls.
Sometimes, the built-in controls might fall short in catering to specific user interface requirements or unique design elements. As a consequence, you’ll need to create your own by combining individual UI elements into a single, more effective unit. Making these elements MVVM-friendly and reusable throughout your app is our goal.
In this chapter, we’ll focus on the following:
- Building a custom control with bindable properties
- Enabling interactions on custom controls
- Working with control templates
By the end of this chapter, you’ll know how to make custom controls that not only look good but are also easy to manage in an MVVM...