4 Controls

 

This chapter covers:

  • What is meant by the broad term ‘View’
  • The built in cross-platform controls that are abstracted for use in .NET MAUI apps
  • How to display collections or lists of data using templated views
  • How to use common modifiers to change the visual appearance of views
  • How to use common modifiers to add or update functionality of views

Controls are views that either directly render something on screen (like an Image or a Label) or take input from a user (like a CheckBox or DatePicker). There are roughly 30 controls that ship with .NET MAUI out of the box, covering all the common use cases for UI applications, and we’ve already used several of these in our apps and seen how they work, such as Image, Label, and Entry.

In addition to the built-in controls, there are more available in the .NET MAUI Community Toolkit, as well as in free and commercial UI kits available that provide a range of additional controls, and stylised or customisable versions of the built-in controls too. And, of course, you can build your own controls too, which we’ll look at in chapter 8.

4.1 What do we mean by ‘Views’?

 
 

4.2 Cross-platform Controls

 
 

4.2.1 Displaying Information

 
 
 

4.2.2 Accepting Input

 
 
 
 

4.2.3 Accepting Commands

 
 

4.2.4 Displaying Graphics

 
 

4.3 Displaying Lists and Collections

 
 

4.3.1 CollectionView

 

4.3.2 ListView

 

4.3.3 CarouselView and IndicatorView

 

4.3.4 TableView

 
 

4.4 Common Properties and Control Modifiers

 
 
 

4.4.1 Height and Width

 
 

4.4.2 Clipping

 

4.4.3 Borders

 
 

4.4.4 Shadows

 
 
 

4.4.5 Gesture Recognisers

 
 

4.4.6 RefreshView

 
 

4.4.7 SwipeView

 
 
 

4.5 Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest