In chapter 2, we built and ran our first .NET MAUI app and made some small changes, but our app didn’t really do anything. You may have spotted the Click Me button, which, when clicked, increases a number displayed onscreen. In this chapter, we look at how this works and see that we can get and set values on UI elements from code.
Increasing a counter isn’t the most exciting thing in the world, and it’s something you can easily do with a web app. So, in this chapter, we start to explore device capabilities that make it fun to build mobile and desktop applications with .NET MAUI.
In this chapter, we see how data binding is used to bind values and commands from our UI to our code, and we see how the class corresponding to our view can easily manipulate our view. We go through a couple of examples that demonstrate this while also learning how to persist data locally on our device and access common device and OS features through the .NET MAUI APIs.