GUI Toolkits
This page contains a list with a couple of known toolkits for Graphical User Interfaces that you can use in your Mono software.
If you need help to know which one is the best for your project, please have a look at Choosing a GUI Toolkit.
Gtk#
Banshee, a GTK# app
F-Spot, a GTK# app
Homepage: GtkSharp
GTK# is a .NET binding for the Gtk+ toolkit. The toolkit is written in C for speed and compatibility, while the GTK# binding provides an easy to use, object oriented API for managed use. It is in active development by the Mono project, and there are various real-world applications available that use it (Banshee, F-Spot, Beagle, MonoDevelop).
In general, GTK# applications are written using MonoDevelop, which provides a visual designer for creating GTK# GUIs.
Platforms: Unix, Windows, macOS
Pros:
- Good support for accessibility through its Gtk+ heritage.
- Layout engine ideal for handling internationalized environments, and adapts to font-size without breaking applications.
- Applications integrate with the Gnome Desktop.
- API is familiar to Gtk+ developers.
- Large Gtk+ community.
- A Win32 port is available, with native look on Windows XP.
- The API is fairly stable at this point, and syntactic sugar is being added to improve it.
- Unicode support is exceptional.
Cons:
- Gtk+ apps run like foreign applications on macOS.
- Incomplete documentation.
MonoMac
Homepage: MonoMac
MonoMac is aimed at .NET/Mono developers that want to allow their users to have a native macOS application experience. MonoMac allows developers to access the whole range of macOS APIs from C#, it is not limited to the AppKit GUI APIs.
The MonoMac APIs replaced the old CocoaSharp binding, which is now deprecated.
Platforms: macOS
Pros:
- Native look and feel on macOS.
- Substrate is well documented.
Cons:
- Not portable outside of macOS.
Windows.Forms
NUnit, a Winforms app
SharpChess, a Winforms app
Homepage: Winforms
Windows.Forms is a binding developed by Microsoft to the Win32 toolkit. As a popular toolkit used by millions of Windows developers (especially for internal enterprise applications), the Mono project decided to produce a compatible implementation (Winforms) to allow these developers to easily port their applications to run on Linux and other Mono platforms.
Whereas the .NET implementation is a binding to the Win32 toolkit, the Mono implementation is written in C# to allow it to work on multiple platforms. Most of the Windows.Forms API will work on Mono, however some applications (and especially third party controls) occasionally bypass the API and P/Invoke straight to the Win32 API. These calls will likely have to be changed to work on Mono.
In general, Winforms applications are written using Microsoft’s Visual Studio or SharpDevelop, which both provide a visual designer for creating Winforms GUIs.
Platforms: Windows, Unix, macOS
Pros:
- Extensive documentation exists for it (books, tutorials, online documents).
- Large community of active developers.
- Easiest route to port an existing Windows.Forms application.
Cons:
- Internationalization can be tricky with fixed layouts.
- Looks alien on non-Windows platforms.
- Code that calls the Win32 API is not portable.
Qml.Net
Qml.Net is cross-platform integration of Qml/QtQuick for Mono/.NET/.NET Core. It is a binding that brings .NET types into JavaScript with full interoperability.
Pros:
- Leverage the power of an existing GUI framework with an existing track record.
- Cross-platform (Windows/Linux/OSX) for various .NET runtimes.
- Support for language specific features, such as
async
andawait
, and Qt’s signals. - Extensive unit tests. Extra care is taken to ensure memory safety and that there are no memory leaks.
Cons:
- Documentation is lacking.
Work in Progress
Listed below are some Toolkits that are in several stages of active development but don’t have a stable release yet.
Xwt
Homepage: https://github.com/mono/xwt
Xwt is a cross-platform toolkit that works by exposing one unified API across all environments. The API is mapped to native controls on each platform.
It can be used as a standalone framework or it can be embedded into existing applications. MonoDevelop uses this toolkit for simple interfaces that need to feel native across all the platforms, without the need to write platform specific code.
Pros:
- Extremely simple API.
- Native look and feel on each platform.
- Can be embedded in existing applications.
Cons:
- Poor documentation.
QtSharp
Homepage: https://github.com/ddobrev/QtSharp
QtSharp started as a sucessor of the Qyoto project. It aims to create libraries that wrap Qt thus enabling its usage through C#. It relies on CppSharp and generates the wrappers based on a pre-installed Qt setup.
Still in early development.
Dead efforts
There are a couple of Dead Toolkits that have been developed in the past.