News

.NET MAUI Layouts Revamped, Developers Question Lack of Linux

New layouts were announced in .NET MAUI Preview 7, and some developers are still questioning the lack of Linux support in Microsoft's next-gen evolution of Xamarin.Forms.

The open source .NET Multi-platform App UI (MAUI) is a cross-platform framework for creating native mobile and desktop apps with C# and XAML. Microsoft calls it an evolution of Xamarin.Forms in part because it adds the ability to create desktop apps in addition to the traditional iOS and Android mobile apps targeted by Xamarin.

However, those desktop apps won't be of the Linux kind, which was questioned by several developers responding to the Preview 7 announcement earlier this month.

MAUI (.NET Multi-platform App UI)
[Click on image for larger view.] MAUI (.NET Multi-platform App UI)(source: Microsoft).

After program manager David Ortinau confirmed that "we do not support Linux as a development environment for .NET MAUI," Microsoft exec Richard Lander said, "It would be good knowing how many people would benefit from/need Linux environment support for development."

To which a developer responded: "I do agree. And generally I'm sure that Microsoft will be able to find out the answer in case it feels like it needs to. However since '.NET is Free. Cross platform. Open source' and also 'Supported on Linux, Windows, and macOS' and MAUI is .NET, avoiding Linux support brings some dissonance. I was given tools (C#/F#, .NET), but I can't use them. Not to mention that most popular cross platform UI frameworks do support Linux. So question arises."

Other developers also weighed in with comments including:

  • Linux support is essential for teaching .NET MAUI and its adoption because many Software Engineering students and education institutions use Linux. Therefore, they usually prefer the technology available on all platforms.
  • I think the main competitor of Maui is flutter which supports Linux at a large stage. so I think support for Linux is crucial. Also, there should be extensions(hot reload and other stuff) to develop Maui from vs code properly.

The lack-of-Linux-support issue isn't new, however, as Ortinau addressed it way back in January in an online presentation about the initial release. He said: "I saw a comment earlier in the chat, you know, really excited about the possibility of Linux support. That's absolutely on our radar but I want to be very clear that in our our plans what we are going to be supporting at launch. Linux is not part of that, so it is something that could be evolved from the GdkSharp back-end that Xamarin.Forms has today, but somebody's going to need to step up and and kind of help contribute and bring that over the line so that it will run with .NET 6."

In other words, Microsoft is relying on community help to add Linux support, which was clearly spelled out in a Xamarin.Forms 5 vs. .NET MAUI comparison published at the time that indicates Microsoft developers will tackle macOS support (left up to "Community" in XF5), but not Linux:

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

The discussion -- literally a GitHub discussion titled First class Linux support developed by Microsoft -- has also been batted around on the .NET MAUI repo, with the original February post saying: "For a company trying to push such a progressive agenda, gaslighting Linux users by 'explaining' that because Linux is open source, the only way to have Linux support is from the community is frankly cruel. As is railroading conversation about this out of sight into the discussions area where it can be safely ignored."

Following hundreds of comments, the most recent entry in that discussion (two days ago) reads:

The issue is that Microsoft has not committed to saying that it will be supported one way or another. Their current stance is that the community will support this feature. I think if Microsoft were to commit to that it will be supported in a future update a lot of this complaining would go away, but they haven't. I do believe that some of the engineers at Microsoft are working on a library separately, but not with the support of Microsoft. That doesn't mean that it won't get support in the future, but we can really only go by what we already know for fact.

So it looks like Linux support may well be coming, one way or another.

In the meantime, a highlight of .NET MAUI Preview 7 is the introduction of new layouts, which help developers present their projects in several ways, such as a grid, flexible layout, horizontal and vertical stacks and so on.

A Grid Landscape Layout
[Click on image for larger view.] A Grid Landscape Layout (source: Microsoft).

"Up to now the layouts you've been using in .NET MAUI are the Xamarin.Forms layouts that were made aware of how to size and position both renderers and the new handler based controls," Ortinau said in the Aug. 11 announcement. "We began with this approach in order to quickly put UI on screen and focus our efforts on completing our library of UI 40 controls, and to prove out our ability to be compatible with projects migration from Xamarin.Forms. At the same time, we have been building optimized layouts based on a new LayoutManager approach employing our 7 years of Xamarin.Forms layout learning to optimize for consistency, performance, and maintainability."

While the old Xamarin.Forms layouts can still be used by developers, the new ones that are now enabled by default include:

Other tweaks affected accessibility, font scaling and more.

An unusually high number of developer comments (55) speaks to the popularity of and interest in .NET MAUI, with several enthusiastic comments along the lines of "Very cool!" and "Lots of MAUI goodness. Great work!" (though many comments were back-and-forth discussions about trying to get everything to work right in the fledgling framework).

Ortinau entreated developers to provide feedback on functionality like deployment, editing and debugging. Regarding the latter, he did note one existing problem: "At the time of release, we are troubleshooting the latest Windows App SDK Single-project MSIX extension for Visual Studio 2022 and .NET MAUI to address a failure to debug. You can successfully deploy the Windows app directly and run it from the Start menu."

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • Full Stack Hands-On Development with .NET

    In the fast-paced realm of modern software development, proficiency across a full stack of technologies is not just beneficial, it's essential. Microsoft has an entire stack of open source development components in its .NET platform (formerly known as .NET Core) that can be used to build an end-to-end set of applications.

  • .NET-Centric Uno Platform Debuts 'Single Project' for 9 Targets

    "We've reduced the complexity of project files and eliminated the need for explicit NuGet package references, separate project libraries, or 'shared' projects."

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

Subscribe on YouTube