Microsoft produces both UI frameworks and app platforms. App platforms typically include a UI framework, while UI frameworks are either standalone (not shipped with an app platform) or can be used with multiple app platforms (see Choose your app platform).
Here's an example of a Button control that's available in UWP, WinUI 2, and WinUI 3. When you place this control into your app, it automatically receives the default design that the UI framework provides.
Here's an example of a style component called Acrylic, available in WinUI 2 and WinUI 3. Acrylic is a brush that you can use on surfaces within your app or as the background of your app. It provides a translucent texture.
An example of a built-in animation in UWP, WinUI 2, and WinUI 3 is the animation that occurs when the end user switches between light and dark mode. When the end user switches modes for their entire PC, the app's UI will automatically update as well with a transition animation.
UI frameworks provide built-in accessibility to controls and styles with purposeful keyboard behavior, screenreader support and more. Many also provide APIs for accessible actions in custom controls, like interacting with screenreaders.
Each UI framework released by Microsoft has unique capabilities, follows different design languages, and provides different experiences to the end user. This section will compare all the main UI frameworks that you'll be choosing from when you begin to build your app.
For most new Windows apps, we recommend WinUI with the Windows App SDK (WinUI 3) to build your user interface. WinUI 3 provides consistent, intuitive, and accessible experiences using the latest user interface (UI) patterns.
WinUI 3 is completely decoupled from the Windows OS and ships as a part of the Windows App SDK, which is a set of tools and components that represent the next evolution in the Windows app development platform.
For most UWP apps, we recommend using WinUI 2 to build your user interface. WinUI 2 is a standalone UI framework that ships in a NuGet package and can easily be added to any UWP app to modernize the design and overall experience.
The Windows Presentation Framework (WPF) is an app model for building desktop apps with .NET 6 (and later) or .NET framework. It's an open source platform that is maintained by both the Windows and .NET teams.
Windows Forms provides a unique built-in Visual Studio Designer for building desktop .NET apps. With the Designer, you build your user interface by dragging and dropping the built-in controls directly onto your app's UI.
Note that Windows Forms does not have animations built in, unlike the other UI frameworks mentioned in this article. It also does not support XAML markup - you must use either the Designer or code to create your app's UI.
There are a few UI frameworks that haven't been discussed in this article, including Win32/ComCtl32 and MFC. While these UI frameworks are still available for use, they are not regularly maintained and don't meet the same accessibility and design standards that Windows provides today. It's recommended that you use a more modern framework when creating new Windows apps.
Qt Designer is a tool for quickly building graphical userinterfaces with widgets from theQt GUI framework. It gives you asimple drag-and-drop interface for laying out componentssuch as buttons, text fields, combo boxes and more. Here isa screenshot of Qt Designer on Windows:
Qt Designer produces .ui files. This is aspecial XML-based format that stores your widgets as a tree.You can either load these files at runtime, or have themtranslated to a programming language such as C++ or Python.
Many people like to use Qt Designer together with Python because it is a very productive programming language. The easiest way to combine the two is viaPyQt or PySide6.To install PyQt, simply enter the following on the commandline:
Run the command fbs startproject. This asks you a few questions about the name of your app etc. It creates the directory src/main/python. The command fbs run should now give you a quick preview of the empty application created by startproject.
Then execute fbs installer. On Windows, you need to install NSIS first and place it on your PATH. On Linux, you need fpm. But once you have these prerequisites, fbs will magically create your installer. Congratulations!
Qt Designer normally ships as a part of Qt Creator.This is Qt's official editor and lets you do a lot more than just graphically design user interfaces. It is a full-fledged and very powerful C++ IDE. This power comes ata price however: The download for Qt Creator is gigabytes insize!
This page was created for people who only need Qt Designer.The download links here contain minimal, self-containedinstallers of just Qt Designer that are orders of magnitudesmaller. Here they are again:
Michael has been working with Qt and Python since2016, when he startedfman,a cross-platform file manager. Frustrated with thedifficulties of creating a desktop app, Michael open sourcedfman's build system (fbs). It saves you months when creating Python Qt GUIs. Recently, Michael also wrote a popular book about these two technologies.
7fc3f7cf58