XP Container Look

Update 23rd Feb 2006: Ted Bracht has kindly ported the LinkButton and DropContainer packages to Dolphin 6. The download is here. Thanks Ted!

By: Steve Waring
Home Pages: Journal Dolphinharbor
Created: 20030118
Last Update: 20030118

Overview

This article combines the packages from the two previous articles to create a sample application with a Windows XP "WebView" look and feel. It contains some thoughts on Windows XP themes and skinning.

xpContainerLook

The above screenshot is from the sample application.

Overview

The code that is used in this sample is covered in the previous two articles: XP Look and Feel - LinkButtons and XP Look and Feel - DropContainers

Themes

A good reference for information on XP themes is WindowsXP_DesignGuidelines.

While the above screenshot has the right XP look, it only has the right look if the user is using the "default Blue color scheme" (theme). Of course, it also gives the application a XP look when running on Win98/2k, and I consider this to be a big plus.

In the FAQ of the WindowsXP_DesignGuidelines document it says: "Because of the added complexity we do not recommend that applications theme themselves separately from the OS."

This wouldnt be a problem if I was just targeting XP, and while I wish I could, it is not an option to ignore how my apps look under Win2k/98. The differences in XP layouts mean that I cant leave Win2k/98 to paint in default colors ... IMO it wouldnt be a good look.

I see three options;

SkinManager

Option 2) is the easiest for me, as I already have it working in my current applications. I use what I call a SkinManager singleton that contains all the current imageIndexes/ bitmaps/ images/ css and animations. By switching the singleton (and giving various presenters a prod and poke), I can dynamically change the whole look of the app, since I configure all view aspects using methods in my presenters. (Toolbar Bitmaps are tricky, you need to get them out of the SharedCache first, but it can be done). This has the major benefit that the Refactoring Browser can see all the code, but it also means that I can implement looks for the three XP themes (in addition to my "default" "warm" and "borg" looks :).

I am taking a similar approach to Groove, in that all my resources; (icons/ bitmaps/ images/ animations/ html/ css) are files. Each "skin" is a folder under a "Skin" directory, and if the particular resource is not present for the selected "skin", it uses the default. While I wont support it, it will give users who are into it, the ability to create their own looks for my applications.

In the "FAQ" section of the WindowsXP_DesignGuidelines document it says: "Only three themes ... At this point in time we are not allowing additional themes to be created for Windows XP. This is primarily because we have found that additional themes can cause application compatibility issues. "

No kidding!. However, there are programs available that hack this to make more themes available, and I am sure that as time goes on, Microsoft will support more themes.

Skins

Some information on skinning can be found at: Windows Customization 2002.

Again in the "FAQ" section of the WindowsXP_DesignGuidelines, I found this comment interesting: " Yes it is possible for applications to theme themselves separately from the OS. Windows Media Player is an example application that does ...". I see the Media Player as at the edge of Windows user interfaces, but it doesnt just display a theme, it allows full skinning.

Microsoft on skinning, Windows, and the future certainly suggests that the theme engine may one day be more powerful than it is now.

I have played and poked around with handling NC_PAINT to customize the non-client areas of a window, and while I would love to spend more time on this, it would be a luxury, and I have enough things that need doing before I can do any serious work on it.

My biggest problem would be creating bitmaps etc that dont look really bad. It is amazing what talented graphics designers can do, but I struggle (evidence is the open/close icons included in this sample! I actually had them looking good when I was using Toolbar bitmaps, but they didnt convert so well to icons when I switched to using SWLinkButtons. I need to do a full reworking of all my icons, so at this stage they are good enough :)

One solution to this problem is to pick an application that has similar functionality, and lots of skins in the public domain, and just use their format ... immediate skins!

Why Bother?

I believe that allowing the user to customize an application could be a useful marketing tool, and can help to build a community around an application.

I also believe that many users will judge my applications by how they look, not how they perform.

From the "FAQ" section of the WindowsXP_DesignGuidelines: " Most users will expect a consistent user experience, across multiple applications so doing a custom look on your application can detract from the user experience of your application. ".

Really? ... the users I know dont know to expect that. Personally I like seeing applications try innovative UI ideas. I wonder if the above should be interpreted as "it is in the best interest of the user", or "it is in the best interest of a company that distributes multiple applications across many market segments?"

If users judge applications by their look and feel, how can a small guy get an edge over the bug guys?

Plan

My plan at this stage is to stick with what I have, and before releasing, play around with XP for a couple of weeks so that at the least, my applications look acceptable if the user is using a non-default theme.

Hopefully by that stage Dolphin6 will be out, and I will know if I can make use of any base code to make my job easier (I should point out that I have absolutely no idea whether Dolphin6 will have any support for themes). If not ... well I see playing around with stuff like this as an adventure, and at the least, I will have fun trying to get it to work myself :)

If you have any thoughts or comments on themes/skinning in Dolphin, please dont hesitate to contact me.

Downloads

The packages are released under the OpenBSD license (ie free). The "SWXPContainerLook_1.zip" contains the Sample shell and the SessionManager that was used to deploy the test ToGo. It also includes the "SW LinkButton.pac" and "SW DropContainerLayout.pac" package from the previous articles XP Look and Feel - LinkButtons and XP Look and Feel - DropContainers. In addition it includes two (excuses for) icons that expect to be found in the [Image Directory].

The ToGo is released as TestWare ... if you have a problem with the code or technique in your environment, you will be doing me a big favor by letting me know about it.

Notes;


Copyright Steve Waring 2003.