So you want to create a Windows app? Here’s what you need to know

Posted in:

Editor’s note: Joe Finney is an OnMSFT alum and a Windows apps developer. From Joe:

My name is Joe Finney and I make apps to help you be more productive. I am passionate about software and creating tools and utilities which make our modern lives easier. I live in Milwaukee and when I am not building apps I enjoy running, coffee, and bird watching. Check out my apps here: https://joefinapps.com/ where several are open source, so feel free to take a look and open an issue if you have an idea.

+++

Spending long days using Windows has a way of highlighting pain points. While there are probably millions of Windows applications out there, it is very possible none of them solve your problem just the way you expect. Now what do you do? Write your own app!

So, you do some research and the quickly get overwhelmed and give up. There is a long history of different ways to make apps for Windows, so how do you decide? I make apps for Windows, and I have used 4 of the possible different techniques and can help you choose a UI framework for Windows.

Without going all the way back, there are 5 modern ways to build apps for Windows which Microsoft has provided. In order of oldest to newest they are:

  1. WinForms
  2. Windows Presentation Foundation (WPF)
  3. UWP
  4. WinAppSDK
  5. MAUI

If you follow Microsoft development closely you might wonder why WinUI wasn’t mentioned in the list, or where it fits in. Microsoft has been building WinUI starting with UWP to separate the UI and controls library from the Software Development Kit (SDK) and releases of Windows. This way apps using different techniques could all target a more common style of UI controls and give Windows apps a more uniform look and feel.

In practice this means WinUI 2 is what UWP uses while WinUI 3 is the standard for all apps made after UWP and some non-Microsoft app platforms. If an app is built with WinAppSDK, MAUI, UNO, or React Native, then its UI is powered by WinUI 3. I suspect the new Apple apps were built with React Native which is why they have benefit from the latest controls while still being built with cross-platform technology.

Here is a short summary of each Windows app framework, examples and why you would choose that one in particular.

So you want to create a Windows app? Here’s what you need to know - OnMSFT.com - February 6, 2023

WinForms

This classic Windows app framework allows for quick and simple apps to be built with an easy drag and drop editor for easy no-code UI. The logic is in code files usually in VisualBasic or C#. This framework is great when you are just getting started or found an open-source legacy app you want to build upon like I did with Windows Caffeinated.

Pros

  • Simple and easy UI building
  • Plenty of online content
  • Supports latest .NET

Cons

  • Dated inflexible UI
  • Not in active development by Microsoft
  • Complex apps become unwieldly

Example

Windows Caffeinated
Windows Caffeinated
Developer: JoeFinApps
Price: Free

Bottom-Line

If you need a quick and simple app to automate a task, or do some complex work for you, WinForms can do the trick without requiring learning a UI language on top of a logic language.

Text Grab Edit Text Window
Text Grab Edit Text Window

WPF

While a simple and straightforward app UI is always appreciated, sometimes your app needs the flexibility to do anything. Without a doubt WPF is the most flexible of the Windows UI app frameworks from Microsoft. All of the UI is defined by XAML, and the logic is found in separate C# code files.

Pros

  • Dangerously powerful UI building
  • Huge amount of online content when searching
  • Supports latest .NET

Cons

  • Dangerous powerful UI building
  • Not in active development by Microsoft

Example

Text Grab
Text Grab
Developer: JoeFinApps
Price: $9.99

Bottom-Line

If you need an app which requires special UI capabilities like transparent Windows with no controls, then WPF is the only way to achieve this. Otherwise maybe check out WinAppSDK

Ink Calendar and Journal Different Views
Ink Calendar and Journal Different Views

UWP

There was quite the uproar about UWP being dead or not, and at the end of the day for new projects, UWP largely is dead. The Universal Windows Platform introduced some new and very handy APIs to Windows apps, but also some strict app requirements. Microsoft has since offered those APIs to the other frameworks and now with WinAppSDK, WinUI exists on a new framework making the use case for new UWP so narrow it is basically nonexistent.

Pros

  • Respects mobile touch first Windows devices

Cons

  • Not in active development by Microsoft
  • Does not easily support latest .NET
  • Restricted to hobbled app container

Example

Ink Calendar and Journal
Ink Calendar and Journal
Developer: JoeFinApps
Price: $19.99

Bottom-Line

Don’t start new UWP Projects.

Simple Icon File Maker with a Planet Sticker
Simple Icon File Maker with a Planet Sticker

WinAppSDK

The latest and primary tool Microsoft recommends for Windows apps on Windows. Take the APIs and  WinUI from UWP and hack on some old school Win32 APIs for some reason and boom you have WinAppSDK. This is the framework Microsoft recommends developers use for new Windows only apps and is currently improving and developing WinAppSDK.

Pros

  • Uses WinUI 3 by default
  • Supports latest .NET
  • In active development by Microsoft
  • Great access to APIs new and old

Cons

  • UI not as flexible as WPF
  • Not a huge amount of online content
  • Still feels a little unpolished

Example

Simple Icon File Maker
Simple Icon File Maker
Developer: JoeFinApps
Price: Free

Bottom-Line

If you need a Windows app with decent UI and behaves like an app (not a utility or extension of the OS) then WinAppSDK is the best choice for you. It is actively being developed and getting more features and improved to address community concerns and market needs.

dotnet-maui-release-candidate-rc1

MAUI

If you think your app could gain broad appeal, then a cross-platform app supporting Apple and Google’s operating systems in addition to Windows maybe the choice for you. While I do not have any first-hand experience with MAUI it is clearly the path Microsoft sees as their cross-platform development offering going head-to-head with Google’s flutter and Meta’s React Native.

Pros

  • Cross-platform!
  • Uses WinUI 3 on Windows
  • Supports latest .NET
  • In active development by Windows

Cons

  • New product not as polished or complete as alternatives
  • Not a lot of online content

Example

.NET Podcasts (dotnetpodcasts.azurewebsites.net)

Bottom-Line

If you have the skills to make Windows apps but need to make a cross-platform app for some reason, then MAUI is the best option!


Now what?

Hopefully this post has taught you the general overview of Windows app development. Now you should get working! Pick a simple idea, find some tutorials online and begin building. Getting into the code and making apps is the only way to build the skills. What app are you going to make and what framework are you going to use?

< Previous

Microsoft and Elgato join forces to integrate Microsoft Teams and Stream Deck

Activision Blizzard hit with $35M SEC penalty following violations probe

Next >