New .NET MAUI Community Toolkit Built on .NET 7

Along with new views and layouts, the latest iteration of Microsoft's .NET MAUI Community Toolkit is out with a version built on .NET 7.

The kit is one of many offered by Microsoft. Served up by NuGet, such toolkits typically are collections of helper functions, custom controls and app services designed to simplify and demonstrate common developer tasks for projects of varying types. The free and open source .NET MAUI Community Toolkit is described by Microsoft as a community-created library that contains extensions, advanced UI/UX controls, converters and behaviors to help make .NET MAUI developers' lives easier.

The dev team pumped out three releases in a short period, with the .NET 7 support coming in the latest. Microsoft described them thusly:

  • Version 1.4.0 -- adds Expander, DockLayout & StateContainer (and of course a lot of bugfixes!) -- Release Notes
  • Version 2.0.0 -- adds full Tizen support for all of out features, including the changes from v1.4.0 -- Release Notes
  • Version 3.0.0 -- everything from v1.4.0 and v2.0.0 but is built against .NET 7 -- Release Notes

"With this versioning strategy we aim to empower as many developers as possible: everyone on .NET 6 can get all the features we've merged so far, including Tizen support using v2.0.0," the team's Dec. 1 announcement said. "For those using .NET 7 you can get all the features using v3.0.0." Going forward, .NET 7 will be the target for new features in the toolkit. .NET 7 debuted last month, furthering Microsoft's years-long effort to unify disparate development products with "just one .NET going forward."

New features/functionality for the latest releases includes:

  • Expander View: This is a container control providing a way to expand and collapse visual content when tapping a header, coming in two sections, the header and content. Developers can show or hide it by tapping the Expander.Header or by setting the IsExpanded bindable property.
  • DockLayout: This is a layout where views can be docked to the sides of the layout container, providing an option in scenarios where developers might want to divide the screen into specific areas, for example.
    The New DockLayout
    [Click on image for larger view.] The New DockLayout (source: Microsoft).
  • StateContainer This simplifies the dynamic display of content based on the state of an application. Examples include creating loading views to an overlay on the screen, or on a subsection of the screen, while empty state views can be created if there's no data to display, and error state views can be displayed when an error occurs.
  • Tizen Support: "In a massive contribution by the Samsung team there is now Tizen support for the .NET MAUI Community Toolkit. This brings the .NET MAUI Community toolkit to millions of Samsung TVs, phones, and other devices running Tizen."

Microsoft also announced some attention to the the MAUI.Markup Toolkit, a collection of Fluent C# Extension Methods that allows developers to architect their apps using MVVM, Bindings, Resource Dictionaries and so on in C# without having to work in XAML.

It received new C# extension methods for App Themeing and ITextAlignment. "In fact, using source generators, Maui.Markup auto-generates extension methods for every ITextAlignment control, even if you create your own custom control!" Microsoft said. "We also gave MAUI.Markup the .NET 7 treatment as well."

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


Subscribe on YouTube