Lagging .NET MAUI Preview 9 Updates Controls and Supports Borders, Corners and Shadows
.NET MAUI, the .NET 6 evolution of Xamarin.Forms that's running late, now has updated controls and new support for borders, corners and shadows across most controls and layouts in the latest preview.
Microsoft describes .NET MAUI (.NET Multi-platform App UI) as the evolution of Xamarin.Forms because it adds desktop app support to the traditional iOS- and Android-focused development framework, among other updates. It's described as lagging by Visual Studio Magazine because Microsoft recently declared it had "slipped the schedule" and won't debut with other .NET 6 tooling next month. Rather, a Release Candidate edition is expected in the first quarter of next year with General Availability following in the second quarter.
As with other .NET 6 components that are nearing GA status, the dev team these days is mostly concerned with polishing things up and stabilizing the existing controls and layouts -- now numbering more than 50. However, Preview 9, which shipped last week, does include new support for borders, corners and shadows, along with performance improvements to help Android apps instantly start up.
"The new Border control can wrap any layout or control to add borders and independent control of each corner," said David Ortinau, principal program manager, .NET Multi-platform App UI, in an Oct. 12 blog post. "This controls is provided in the style of WPF, UWP, Silverlight, and the latest Windows App SDK."
The shadow control can bring depth to the .NET 6 project's mascot (or whatever this thing is):
Updated controls, with links for more information, include:
- BoxView: "a simple yet flexible and adaptive view that is useful for many needs."
- IndicatorView: "pairs with any collection based control to display an index of pagination using any shape you need."
- ImageButton: "perfect for what you need a button that is just an image."
- WebView: "uses the platform native browser control to render any online or embedded HTML content; ideal for displaying markup more complex than the subset of HTML supported by
As far as the quicker Android app startup, Ortinau said, "Ahead-of-time (AOT) compilation makes a big difference in how quickly your applications can code start on Android. Full AOT may also make your application artifacts larger than you wish if you're working to remain below the wifi installation bar. In this situation, Startup Tracing is the answer. By partially AOT'ing only the parts of your application executed during startup (by tracing the path of startup execution, hence the name), we are able to balance speed and size."
The post details all the steps needed to put .NET MAUI Preview 9 through its paces, starting with installing .NET 6 RC2 and Visual Studio 2022 Preview 5.
In the comments section of the announcement, several developers reported problems with getting things working. In reply to one such comment, Ortinau recommended using Add/Remove Programs to remove all existing .NET 6 installs and old Visual Studio 2022 previews. "We are definitely still in previews and have some issues to work through," he said.
More information can be found in the project's GitHub repo, which includes a status wiki and roadmap. The latter shows that, in addition to the requisite bug fixes, next month's preview is expected to provide:
- Cross-platform lifecycle events
- Native platform lifecycle events (cont.)
- Microsoft.Maui.Graphics refactoring
About the Author
David Ramel is an editor and writer for Converge360.