News

.NET MAUI Preview 11 Adds Windows 11 Fluent UI Control Styling

Microsoft shipped .NET MAUI Preview 11, which adds new Fluent Design System UI control styling introduced with Windows 11.

.NET MAUI stands for .NET Multi-platform App UI and is described by Microsoft as the evolution of Xamarin.Forms with the ability to create desktop apps in addition to iOS and Android apps. It was supposed to ship with .NET 6 last November but "slipped the schedule" so it's now on track to debut in the second quarter of this year.

.NET MAUI
[Click on image for larger view.] .NET MAUI (source: Microsoft).

In Preview 11, program manager David Ortinau highlighted the beginnings of Fluent Design integration along with functionality related to: multi-window apps; templates and C# 10; iOS, macOS and tvOS type alignment; and new documentation.

".NET MAUI provides platform-specific design and experience by default, so your apps get the right look and feel for each platform from a single code base without any additional effort," Ortinau said in a Jan. 5 blog post. "Windows 11 introduces new UI styling with the updated Fluent Design System, and .NET MAUI styles all controls to use the latest. Subsequent previews will build upon this, adding more controls and support for themes."

Fluent Design
[Click on image for larger view.] Fluent Design (source:Microsoft).

The initial controls being updated include Button, Editor and Entry.

The multi-window app functionality, meanwhile, is one of the reasons that .NET MAUI is described as an evolution of Xamarin.Forms, which doesn't have that capability. Ortinau provided instructions on how to try it out on macOS or iPadOS, also noting that the Windows App SDK implementation of multi-window will be experimental until v1.1.

As part of an ongoing simplification effort (including moving from multiple projects per platform to a single project), the team updated templates using C# 10 patterns, including implicit usings and file-scoped namespaces. Also item templates for ContentPage and ContentView were added. "Now when your project opts-in to using ImplicitUsings you'll see a cleaner project file like our template's MauiProgram.cs," Ortinau said.

In other highlights, the iOS, macOS and tvOS type alignment mentioned above involves updates to Apple-related SDKs being done as part of an effort to unify Xamarin SDKs with .NET 6, impacting existing libraries built for those OSes using .NET 6. Specifically, the SDKs have been updated to use native C# nint and nuint types in .NET 6 instead of the System.nint and System.nuint types. Thus developers should recompile existing code against .NET 6 and manually update existing .NET 6 code to use the new types.

Finally, new documentation has been added.

"We have published a new batch of documentation for .NET MAUI including new guides for Accessibility, BlazorWebView, Border, GraphicsView, Maui.Graphics, Shadows, Splash Screen, multi-targeting, and how you can invoke platform code," Ortinau said. "Xamarin.Forms documentation is in the process of being ported and updated to .NET MAUI, and we'll be publishing regularly from here on out. Anytime you cannot find the .NET MAUI documentation you need, check to see if there's a Xamarin.Forms doc available since most of the concepts all apply to .NET MAUI as well."

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

Subscribe on YouTube