SWF Widgets

SWF Widgets is a tool written to help porting existing Windows Forms applications to wxWidgets toolkit.

wxWidgets is a cross-platform toolkit that has been optimized over time to make writing dialogs by hand as easy as possible, but this approach has limitations as soon as dialogs reach a certain complexity. Even without the inevitable number of typos, writing nice looking dialogs is a hassle and reordering the items in a dialog often amounts to rewriting the dialog from scratch. In addition to being quite some work, writing dialogs also requires a profound and exact knowledge of the syntax used for creating and positioning dialog items.

Windows Forms is a framework for building Windows client applications that utilize the common language runtime. Windows Forms applications can be written in any language that the common language runtime supports. Some of the advantages of using Windows Forms include the following:

  • Implicity and power: Windows Forms is a programming model for developing Windows applications that combines the simplicity of the Visual Basic 6.0 programming model with the power and flexibility of the common language runtime.
  • Lower total cost of ownership: Windows Forms takes advantage of the versioning and deployment features of the common language runtime to offer reduced deployment costs and higher application robustness over time. This significantly lowers the maintenance costs (TCO) for applications written in Windows Forms.
  • Architecture for controls: Windows Forms offers an architecture for controls and control containers that is based on concrete implementation of the control and container classes. This significantly reduces control-container interoperability issues.
  • Rich graphics: Windows Forms is one of the first ship vehicles for GDI+, a new version of the Windows Graphical Device Interface (GDI) that supports alpha blending, texture brushes, advanced transforms, rich text support, and more.
  • Flexible controls: Windows Forms offers a rich set of controls that encompass all of the controls offered by Windows. These controls also offer new features, such as "flat look" styles for buttons, radio buttons, and check boxes.
  • Design-time support: Windows Forms takes full advantage of the meta-data and component model features offered by the common language runtime to provide thorough design-time support for both control users and control implementers.

SWF Widgets combines the best of these two toolkits allowing anyone familiar with Windows Forms to create aesthetically pleasant and cross-platform dialogs in a matter of minutes using either Visual Studio .NET or Sharp Develop.

The next step when writing GUI programs and dialogs in particular is to add event handlers. This can only be done in the form of source code, and therefore SWF Widgets supports generating source code for event handlers or getter functions to get access to the controls in the dialog by either converting existing code or generating events for existing controls.

 

Why wx.NET and not GTK#

Here are 2 comments made on Slashdot that i believe answer this question:

"Why GTK#? Honestly, GTK is probably one of the worst toolkit for real cross platform development.
The Windows port of GTK sucks. This WiMP thing (Or whatever it's called - it makes GTK app to some degree look like native Windows apps) is not that great. The performance of the GTK(WIMP) apps' GUI is noticeable lower than a native GUI.

Under Mac OS X it's even worse. GTK only works under X11. This means no Aqua look & feel. No copy and paste or drag'n'drop between native OSX apps and GTK apps. Even keyboard shortcuts are different.

Why didn't you chose something like wxWidgets? At least wxWidgets offers native GUIs under any platforms it runs. wxWidgets or any other toolkit that offers real platform independence.
Or: With all these XML GUIs under .NET (like XAML) Ximian could've used Mozilla's XUL toolkit and have better multi platform integration than GTK.

Also - from what I've read on the mailing list archives - Mono only works sometimes on BSD systems.

What kind of independence is this? You are only focused on x86-Linux running GNOME.

Ximian does not seem really interested in real platform CocoaSharp. Stuff like Qt# (for KDE users), CocoaSharp, and other cross platform development is not done by any Ximian guy, but from contributors."

"I'm developing a C# application which has a System.Windows.Forms (SWF) front-end for the Windows version, and a GTK# front-end for the Linux version. I was hoping to get rid of the SWF front-end and deploy my application on Windows and Linux using the GTK# front-end. Despite all of the hype surrounding Mono/GTK# (thanks miguel) i have not been able to get this working because GTK# simply doesn't work correctly with MS.NET. There are parts of GTK# that actually rely on an incompatibility between Mono and MS.NET to work correctly. So when this code is executed with MS.NET, you'll get runtime exceptions. The same code will function correctly on Windows when you use Mono on Windows, but then i get memory leaks every time i use Regex.Match which my application needs quite often. So after leaking about 395MB of RAM, the garbage collector will crash with an error ("too many heap sections"). The same code runs perfectly on Linux in Mono.

I would really like to see Mono and GTK# completely ready to be used on Windows for _serious_ stuff (as in: not the average Hello World GTK# app) but right now, it just isn't up to the task yet. On Linux, it's pretty good already, but on Windows it's just unusable for my application. I've had to go back to using my old SWF front-end for my windows users."


Features

  • Convert Windows Forms Designer generated code by either Sharp Develop or Visual Studio .NET.
  • Supports Visual Studio .NET and Sharp Develop project files.
  • Convert code outside Windows Forms Designer whenever possible.
  • Custom control to help adding wxWidgets controls that don't exist in the Windows Forms toolkit.
  • Automatically adjust controls to form size without using complicated layout sizers.
  • Supports Visual Basic .NET and Visual C#.

SWF Widgets is powered by wx.NET.

Download SWF Widgets 1.6.2472
2.4 MB

System Requirements


Microsoft Windows requires the .NET Framework 4.0 or later.

Linux, Solaris or MacOS X requires Mono 2.0 or later.