Views
There are many controls for displaying and obtaining data from the user. The following sections will cover the most common and useful ones, including those shown here:
- Images
- Labels
- Buttons
- ImageButtons
- Entering text
Images
You can write a .NET MAUI program without images, but it is likely to look pretty boring. Managing images is much easier in .NET MAUI than it was in Xamarin.Forms
. Now, instead of having to have one image for each resolution in iOS and Android, you place one image in the resources folder, and .NET MAUI takes care of the rest for all the platforms!
In this example, we’ll use an image named flower.png
, which you can download from our GitHub repository. If you prefer, though, you can use any image you like. We’ll place the image in the Resources
> Images
folder.
When we are ready to display it, we’ll use an Image View. Here is a simple example:
<Image HeightRequest=...