.NET MAUI Adds New Layouts
Written by Kay Ewbank   
Tuesday, 24 August 2021

 .NET 6 Preview 7 has improved .NET MAUI with new layouts, which the team says is a significant change for performance and reliability. .NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.

The new layouts replace the original layouts, which were reworks of the old Xamarin.Forms layouts edited to be ware of how to size and position both renderers and the new handler based controls. The developers say they took this approach to quickly have a UI available, while focusing their efforts on completing the library of UI 40 controls.

net2

However, they have also been building optimized layouts based on a new LayoutManager approach, and these new layouts have now been made the default. The old layouts are still available, but you have to look in the Microsoft.Maui.Controls.Compatibility namespace.

The new layouts cover Grid, FlexLayout, StackLayout, HorizontalStackLayout and VerticalStackLayout. Each layout has an accompanying LayoutManager responsible for measuring and positioning views.

mauilayout

Alongside the new layouts, the preview has a number of changes and additions to the accessibility support, starting with the removal of the TabIndex and IsTabStop. These were introduced in Xamarin.Forms to help developers control the order in which UI elements would be read by a screen reader. However, the developers say that in practice, they ended up being confusing and not meeting that need. In .NET MAUI the recommendation is that you take a "thoughtful design approach that orders your UI as you would want it to be read, rather than looking for programmatic ways to manipulate the structure of your interface."

Another change to improve accessibility is the addition of new SetSemanticFocus and Announce methods. The SetSemanticFocus method is part of the new SemanticExtensions class, and allows you to move screen reader focus to a specific element. The second addition, Announce, sets the text to be announced by the screen reader. The final improvement for accessibility is the enabling of font scaling by default on all controls across all platforms. This means as your application users adjust their text scaling preferences in the OS, your UI will reflect their choice.

.NET MAUI is part of the latest .NET preview, and is available now.

 net2

More Information

MAUI On GitHub

Related Articles

Microsoft Will Replace Xamarin Forms With MAUI .NET

.NET 6 Preview Adds MAUI

Visual Studio 2022 Preview 2 Targets Productivity

Developer Preview Of .NET 6 Released

New In Windows Forms .NET

Xamarin Forms 3.0 Adds Visual State Manager

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Extend NGINX With The New JavaScript Module
28/10/2024

Inject middleware functionality into NGINX with the expressive power of Javascript. NGINX JavaScript or NJS for short is a dynamic module under which you can use scripting for hooking into the NGINX e [ ... ]



Apollo Adds REST APIs For GraphQL
29/10/2024

Apollo has added a simpler way to integrate REST APIs into a federated GraphQL environment. Available now in public preview, can be used to map REST API endpoints to their GraphQL schema using a decla [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 24 August 2021 )