Summary
In this chapter, we examined the markup language XAML, which is used to create layouts and controls. We saw that anything that can be done in XAML can also be done in C#, and we saw that there are two ways to write that C#: the traditional declarative way and the newer fluent form.
We examined a few important classes (Button
, Label
, Image
, and so on) and how events can be handled in the code-behind class. I also hinted that code-behind event handlers will be replaced by commands and their implementation in the ViewModel in the next chapter.
In Chapter 4, we’ll dive into the principal architecture for writing apps in .NET MAUI: Model-View-ViewModel (MVVM) and we’ll look at data binding. We’ll then explore a number of controls and how they can work together.