So far, we’ve looked at Grid, HorizontalStackLayout and VerticalStackLayout, and FlexLayout, and you’ll likely find that nearly any UI you’re trying to achieve can be accomplished using these. But there are more layout options available in .NET MAUI.
Before we get into new layouts, we’ll revisit the Grid and see how we can apply it to more complex layouts. In chapter 5, we saw how to use it for a UI that naturally lends itself to a grid pattern, but it’s also often the best layout for arranging things that don’t initially seem to be a grid. We’ll work through an example of a UI using Grid in a real-world app to get a better understanding of how flexible and powerful it is.
Sometimes, though, you need just a little bit more, and in .NET MAUI, there’s still plenty of room to grow beyond the basics we’ve explored so far. In this chapter, we’ll look at how you can use BindableLayout to convert any layout into a collection view, and we’ll see how FlexLayout is an ideal candidate for this treatment.
After that, we’ll move on to AbsoluteLayout. AbsoluteLayout can be a powerful tool when you need to hit an exact UI target, and we’ll see how you can use it for more exact positioning of elements on a screen.