this looks like a job for... tomorrow!

A Little Bit of Style

Previously, I had mentioned that there were two SoC projects for Mono this year that I was particularly interested in. The second project was the one I mentored: George Giolfan's work to bring native rendering to Winforms.

Currently, our Winforms implementation mimics the "Win32 Classic" look, also known as looking like "ass". It has been important to support this default .Net look, and has provided us with a consistent target, but now George has provided us with something better.

Winforms has the System.Windows.Forms.VisualStyles namespace, that provides access to native rendering on Windows. George has implemented a theme that uses this namespace, to achieve much better looking applications. His work initially focused on writing this for Windows, as the VisualStyles namespace is already implemented for Windows. Although this currently doesn't work on Linux/OSX, the massive amounts of refactoring that George had to do will make it much, much easier to implement this on those platforms as well.

George's code shipped with Mono 2.0, however it is turned off by default. To turn it on, run:
SET MONO_THEME=visualstyles
mono MyApplication.exe

As with .Net, your application will need to call Application.EnableVisualStyles, or it will not use the native look. Please test this feature, as I intend to enable it by default for Mono 2.2. Since the 2.0 release, I have fixed bugs with DataGridView headers always painted as focused, and tooltips not drawing their background. If you find any other issues, please file them in our bugzilla so I can fix them before 2.2.

For a taste of what this looks like, here is MoMA with classic rendering:


And here is MoMA with native rendering:


Finally, a big thanks to George for his awesome work this summer to make this possible!

Edit: Blah, I can't even spell George's name. Terribly sorry!

Smart Client Software Factory on Mono

Recently, Miguel posted that Microsoft's Enterprise Library 4.0 is now available under the Ms-PL, a Mono compatible open source license. This week, I downloaded the Smart Client Software Factory (SCSF) to see if it would run under Mono. It comes with a QuickStart tutorial called BankShell that I used to test with.

I hit two bugs in Mono:
430932 - IsolatedStorageFile.GetStore throws exception
431001 - Exception using XmlTextReader after stream is disposed

I also hit one bug in the SCSF:
18740 - ModuleInfo constructor not cross-platform safe

After commenting out or working around the offending lines, the BankShell application popped up and seemed to work nicely.



The sample application looks simple, but it's actually pretty complex. Each UI element is in a different assembly. The "composite application" dynamically loads each one and places them. The theory is that the application can be broken down into smaller pieces that can be distributed to different teams to build and maintain, and the results are put together to form the whole application.