Linux C# and GUI Tool Kits

Introduction
With the introduction of Mono a while back, A large number of Windows only applications are being ported to Linux. The problem with C# at the moment in regards to GUI tool kits are the number of GUI tool kit bindings available and the cross platform ability.

Lots Of Work
The normal way to approach the GUI tool kit issue is to create a different interface for each operating system. I do not agree with this as it will result in a lot of unnecessary work with the project is split up into 2 main parts. The functionality of the program is programmed and maintained separately to the user interface. This is a great programming style but overkill when there are GUI tool kits that are cross platform.

Linux
Linux has many GUI tool kits to use, but not all are available in C#, incomplete or even abandoned projects.

GUI Tool Kit Status Home Page
GTK# Supported http://www.mono-project.com/GtkSharp
MonoMac Supported http://www.mono-project.com/MonoMac
Windows.Forms Supported http://www.mono-project.com/WinForms
Qyoto Supported http://techbase.kde.org/Development/Languages/Qyoto
Qt4Dotnet Supported http://code.google.com/p/qt4dotnet/
wxNet Supported http://wxnet.sourceforge.net/
Sharp WT Dead http://sourceforge.net/projects/sharpdevelop
Qt# Dead http://qtcsharp.sourceforge.net/
WPF Not Supported http://msdn.microsoft.com/en-us/library/ms754130.aspx


Windows

Windows has support for many of the Linux GUI tool kits through the open source community. A binary file created in Linux MonoDevelop will in most cases if programmed and designed well execute with no changes in Windows. This is of cause if the required files have been installed for the GUI tool kit and the Mono run time on Windows.

GTK#
GTK# is the most supported GUI tool kit in MonoDevelop, the IDE was developed using GTK# as well. GTK# is very easy to program but can take some getting used to if coming from the Windows.Forms. Support in Windows is very good and applications created in GTK# look very similar when executed in both Linux and Windows.

MonoMac
MonoMac is not a dead project but was the result of weekend hacking by the MonoDevelop team. MonoMac brings many features from the OSX operating system and enable programmers to use Cocoa. The problem with the MonoMac GUI tool kit is that it does not enable programmers to make cross platform applications with out using other GUI tool kits for other operating systems.

Windows.Forms
This is the standard GUI tool kit for the Windows operating system before WPF (Windows Presentation Foundation). Windows.Forms is supported but there is no designer in MonoDevelop unless you download the designer from the mono svn, compile and install it. The best way to make a Windows.Forms interface in MonoDevelop is to start the project in Microsoft Visual Studio and then load the project in MonoDevelop. The GUI can be coded with out a designer or the whole project can be developed in Microsoft Visual Studio. This of cause until the Windows.Forms designer is included by default in MonoDevelop. The problem I have found with the Windows.Forms GUI tool kit is the interface does not look the same on different operating systems, this includes the overall look and the sizes of controls and images.

Qyoto
Qyoto is a great project to bring the Qt GUI tool kit and integration into the KDE workspace to C#. The C# bindings for Qyoto are generated automatically from the Qt/KDE header files which reduces maintenance and almost guarantees Qyoto updates. There are Windows run times for Qyoto so applications can be deployed as a cross platform binary.

Qt4Dotnet
Qt4DotNet is a project that is derived from Qt Jambi which is officially supported by Nokia, the maintainer of the Qt project. There is still a lot of work to be done on the project as it is still incomplete. Work on the project has seemed to slow down, the last update on the web site was around a year and two months ago.

wxNet
The wxNet project was to create C# bindings for the wxWidgets framework. Work seems to be ongoing on this project as the last post on the web site was less then a year ago. The project contributors seem to be having trouble with the names of classes and enumerations contradicting conventions in .net. They made an announcement on their web site that the next version will try to change this.

Dead Projects
Projects die when there is a lack of community interest or even developer interest. These projects are unsupported, incomplete and/or out dated. It is not a good idea to develop using dead projects unless you are familiar with the project and have access to the source code to make changes.

WPF
WPF stands for the Windows Presentation Foundation. This is where I think there is going to be a problem in continuing to get Windows programmers to easily port their software as WPF is not supported in Linux. The Olive Project is an unsupported project that brings WPF to Mono which runs on Linux. Olive is a set of add on libraries that is considered experimental and there is no guarantee of stability.

My Opinion
I feel that WPF will be a great asset to Linux as there are a lot of .net developers for Windows and the easier it is to port software to Linux, the more software Linux will have. There are a lot of Linux naturalists that do not like Mono and want it to be removed from the default install of Linux distributions. I have been using Linux since the early 90′s and totally disagree with this.

Please feel free to give your opinion in the comments…

Tags: , , , , , , , ,

9 Responses to "Linux C# and GUI Tool Kits"

Leave a Comment