Choosing the Right UI Framework for Native Windows Applications

What tech should a .NET coder use for a new Windows desktop app when presented with a dizzying array of options that include .NET MAUI, WinUI, WinForms, WPF, UWP, Blazor and so on?

We've investigated that question before (see the article, "With Many Options, .NET Dev Asks for Tech Choice Help: 'I Am Lost'"), and it's still pertinent today.

Desktop Options
[Click on image for larger view.] Desktop Options (source: Microsoft).

"If you want to build a Windows desktop application, you might be overwhelmed by the number of UI frameworks available," says Alvin Ashcraft, senior content developer at Microsoft. "How do you choose the best one for your project and your skills? How do you compare the features, benefits, and drawbacks of each framework? How do you ensure your app is modern, native, and scalable?"

One way to do all that is to attend his upcoming presentation titled "Building a Modern, Native Application for Windows: Which UI Framework Should you Choose?" at the Visual Studio Live! developer conference set to start April 29 in Chicago.

Attendees are promised to learn how to make an informed decision for Windows desktop applications by comparing different UI frameworks:

  • WinUI 3: The latest UI framework that lets you create beautiful, fast, and fluid Windows apps.
  • UWP: The UI framework that lets you create universal Windows apps that run on many types of Windows devices.
  • WPF: The UI framework that lets you create rich, powerful Windows desktop apps using .NET and XAML.
  • Windows Forms: The UI framework that lets you create traditional Windows desktop apps quickly using .NET.
  • .NET MAUI: The UI framework that lets you create cross-platform desktop and mobile apps using .NET and XAML.
  • Uno Platform: Use your knowledge of UWP and WinUI to build apps for any platform.

Discussion will address the pros and cons of each framework, namely:

  • The supported platforms and app models
  • The available UI features and controls
  • The performance and reliability
  • The development tools and languages
  • The learning curve and documentation

Ashcraft will specifically help devs understand the strengths of each UI framework available to Windows developers by learning how to building a simple app with WinUI 3 and the Windows App SDK, and also porting a WinUI 3 app to other platforms with Uno Platform.

We caught up with Ashcraft to learn more about this upcoming, 75-minute introductory/intermediate session in a short Q&A.

VisualStudioMagazine: What inspired you to present a session on choosing UI frameworks to build modern native apps for Windows?
Ashcraft: Windows developers have many choices when it comes to staring a new desktop app project.

"I hear developers asking questions about which frameworks are still supported by Microsoft and how should they choose the best one for their next application all the time."

Alvin Ashcraft, Senior Content Developer, Microsoft

I hear developers asking questions about which frameworks are still supported by Microsoft and how should they choose the best one for their next application all the time. Since joining Microsoft, I've been able to get answers to many of these questions, and I want to share those answers with the developer community. I've also written a book on WinUI 3, and I want to help developers understand when WinUI is the right choice for their project.

Inside the Session

What: Building a Modern, Native Application for Windows: Which UI Framework Should you Choose?

When: April 30, 2024, 9:30 a.m. - 10:45 a.m.

Who: Alvin Ashcraft, Senior Content Developer, Microsoft

Why: Learn how to make an informed decision for your Windows desktop application by comparing different UI frameworks.

Find out more about Visual Studio Live! taking place April 29-May 3 in Chicago

With so many UI frameworks available for Windows desktop application development, what key factors should developers consider when choosing the right framework for their project?
Some of the key points to consider when choosing a UI framework today are:

  • Target audience (consumer vs enterprise)
  • UX needs -- Is it important to match the Windows in-box app experience?
  • Device compatibility -- Is Xbox a target? Is touch and pen input important?
  • Is cross-platform support needed?
  • What is the skillset of your dev team?
  • Project timeline -- How quickly do you need to get to market and how complex is your app?

How does Blazor Hybrid fit into the scheme of things?
Blazor hybrid is a great option when your development team has web experience but needs to target Windows or mobile.

Considering the .NET MAUI dev team ran into some thorny development problems and many developers have complained the framework shipped too soon, how would you assess it now?
It looks to me like the .NET MAUI team is getting close to parity with Xamarin on iOS and Android if it hasn't already been achieved. I believe that .NET 8 was their target for that milestone. Windows has never been the primary target platform for MAUI or Xamarin, but the team has features like tooltips that work great on desktop.

Can you briefly summarize how the performance and reliability aspects that might vary among these UI frameworks affect the choice of a framework?
Each framework has some performance pros and cons. The XAML-based frameworks have the advantage of leveraging device GPUs for UI rendering. UWP apps use .NET Native, which was optimized for performance and memory footprint because Windows Phone was originally a potential target for these apps. However, this also means that you can't leverage the latest features of .NET and the C# language. With any of these frameworks, it's critical to write proper asynchronous code when making database or service calls.

Is it generally just as easy to use the Uno Platform for Windows apps as it is Microsoft's frameworks, or do some challenges come with the third-party approach if you're firmly a Microsoft dev shop?
The folks who create Uno Platform have been working hard to make their platform easy to use when building apps for any platform. They have an intuitive new project wizard that provides a great head-start when building a new app, and their documentation is extensive. There's always some risk when adopting any third-party solution. It's still built on top of Microsoft technology, so your team will be relying on support from both Microsoft and Uno Platform.

For developers brand-new to Windows desktop development, which frameworks would you recommend based on the learning curve and the quality of documentation and support available?
If you're new to Windows development, you should consider your current skillset. If you're a .NET developer, you can leverage those skills and Visual Studio's UI designer for both Windows Forms and WPF applications. .NET MAUI also has options to create your UI completely in C# if you're XAML-averse. If you have a stronger web developer, you can look at either React Native for Windows or Blazor Hybrid apps. I worked with some of the product teams at Microsoft to create a topic on Microsoft Learn to lay out the options for developers to help them choose: "Windows app development: options and features."

As Windows desktop development continues to evolve, how can developers ensure that the applications they build today remain relevant and adaptable in the future? Can you provide insights into future trends or developments in Windows UI frameworks?
It's important to be aware of which frameworks are currently supported as well as whether they are part of Microsoft's (or third party) long-term plans. Take UWP apps for example. While UWP is currently supported, it is no longer receiving new feature updates. Only critical bug fixes and security updates will be provided going forward. Other frameworks like WPF and WinUI 3 are currently supported and have public roadmaps for new features.

Note: Those wishing to attend the conference can save hundreds of dollars by registering early, according to the event's pricing page. "Register for VSLive! Chicago by the March 1 Super Early Bird deadline to save up to $400 and secure your seat for intensive developer training in Chicago!" said the organizer of the developer conference, which is presented by the parent company of Visual Studio Magazine.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


Subscribe on YouTube