.NET 10 for .NET MAUI, brings several improvements to existing controls—and even a few deprecations—that you should keep in mind.
Every change that happens in the tools we use every day is an opportunity to work more easily, quickly and efficiently. That’s why it’s important to stay informed about the updates introduced in .NET 10 for .NET MAUI, especially in the visual components we use constantly. Information such as the new OffColor property in the Switch, or the fact that some APIs now include IsSupported checks, can make your development process much smoother.
These changes, although they may seem simple, help keep your applications up to date and aligned with best practices. In this article, we’ll take a look at several of these important UI enhancements that you definitely need to know about.
I love when the community is heard and issues actually get resolved! 💚
This release added the IsRefreshEnabled property, allowing us to enable or disable only the pull-to-refresh action.
Previously, this couldn’t be controlled separately. The closest property we had was IsEnabled, but using it not only disabled the pull-to-refresh gesture but also blocked every visual element inside the RefreshView. (Which is the expected behavior of IsEnabled, but we didn’t have a specific way to control just the pull-to-refresh action.)
From now on, you won’t need to block the entire component for the user; you can simply use the IsRefreshEnabled property. 😎
Here’s an example of how to use this property:
<RefreshView IsRefreshEnabled="false">
<StackLayout>
<Entry Placeholder="Username" />
<Entry Placeholder="Password" />
<Button Text="Login" />
</StackLayout>
</RefreshView>
The ClickGestureRecognizer was removed in this version. If you were using it in your project, you should now replace it with TapGestureRecognizer.
ClickGestureRecognizer was used to detect simple mouse clicks, while TapGestureRecognizer detects screen taps and also recognizes mouse clicks. Essentially, it does the same thing but with broader coverage and better platform support.
To improve the performance and stability of CollectionView and CarouselView, .NET 9 introduced two optional handlers for iOS and Mac Catalyst.
With .NET 10, these handlers are no longer optional. ✍️ They are now the default handlers for CollectionView and CarouselView.
How does this impact us as developers?
In .NET 10, SearchHandler adds new APIs that allow you to show or hide the keyboard programmatically, making it much easier to control user interaction. These APIs are:
This functionality is very useful in scenarios where you need to manually manage keyboard behavior. For example:
And many other cases where you can control the user experience more precisely.
Additionally, the official documentation recommends reviewing the guidance if you are using reflection-based properties such as DisplayMemberName, as you may need to adjust some trimming and feature switch settings to prevent the linker from removing members required at runtime.
In .NET 10, the DisplayAlert and DisplayActionSheet methods were marked as deprecated. They have been replaced by their new asynchronous versions:
DisplayAlertAsync()DisplayActionSheetAsync()I imagine this change is meant to make the popup handling in .NET MAUI more consistent and up to date, since most modern APIs already work with asynchronous methods. This allows you to:
The good news is that it’s a very simple change. Just replace any usage of DisplayAlert or DisplayActionSheet with their async versions and use await when calling them. That 's it!
In .NET 10, you can now enable or disable the minimize and maximize buttons on Microsoft Windows desktop application windows.
This gives you much more control over a window’s behavior and the overall user experience. Previously, you couldn’t manipulate these buttons because they relied entirely on the operating system’s default behavior—but now you decide how they should behave!
This can be especially useful in scenarios such as:
And many other cases where you need more precise control over the window.
MessagingCenter has been made internal, which means it’s no longer available for direct use in your code. But don’t worry—if you were using it to send and receive messages between components, you can replace it with WeakReferenceMessenger, which is available in the CommunityToolkit.Mvvm package.
Some of the benefits of using WeakReferenceMessenger include:
Which ultimately makes your life a lot easier! 😎
In .NET 10, MediaPicker now automatically handles EXIF information when working with images.
Exchangeable Image File Format: It’s the metadata that is automatically stored inside a photo when you capture it with a camera or a mobile device.
This automatic handling helps in several scenarios, such as:
Images are now automatically rotated based on the orientation stored in their EXIF metadata. Thanks to this, photos will no longer appear:
And the best part: you don’t need to write any additional code! .NET MAUI takes care of it for you! 🤩
When using MediaPicker, the image keeps all its original EXIF data, meaning none of the important metadata is lost, such as:
The image preserves exactly the same metadata it had when it was originally captured.
The SpeechOptions class now includes a new property called Rate, which allows you to control the speed at which the voice is played. This gives you much more control if you want the voice to sound:
You now have even more control over this component’s look and feel thanks to a new property:
You can add it in XAML as follows:
<Switch OffColor="Red"
OnColor="Green" />
And also from C#, as shown below:
Switch switch = new Switch { OffColor = Colors.Red, OnColor = Colors.Orange };
The TableView has been marked as obsolete in this version. If you’re currently using it in your project, the official documentation recommends replacing it with a CollectionView.
In my opinion, CollectionView is an excellent alternative. You can achieve everything you previously did with TableView without sacrificing any key functionality. I recommend keeping an eye on deprecations; schedule some time with your team to address these updates and prioritize keeping your codebase current.
And that’s it! 🎉 In just a short time, you’ve learned about the most important UI updates introduced in .NET 10 for .NET MAUI. Now you can plan your migration work more effectively and know exactly what needs to be updated to keep your codebase current.
If you have any questions or want me to cover more related topics, feel free to leave a comment—I’d be happy to help you! 💚
See you in the next article! 🙋♀️✨
The explanation was based on the official documentation:
Leomaris Reyes is a Software Engineer from the Dominican Republic, with more than 5 years of experience. A Xamarin Certified Mobile Developer, she is also the founder of Stemelle, an entity that works with software developers, training and mentoring with a main goal of including women in Tech. Leomaris really loves learning new things! 💚💕 You can follow her: Twitter, LinkedIn , AskXammy and Medium.