[Mono-winforms-list] Native look theme for Windows

Ernesto equistango at gmail.com
Tue Apr 1 21:57:14 EDT 2008


Hi,

I'm working on a native look theme for Windows XP+.

Basically I grabbed Win32Classic and started replacing custom drawing 
via GDI with calls to UXTheme (using the managed code in 
System.Windows.Forms.VisualStyles).

I already have some basic controls working. It's not rocket science, but 
it's a lot of work because there are many controls.

My current approach: I created the ThemeWin32Native class, which 
inherits from ThemeWin32Classic. This way I don't have to rewrite the 
layout code; instead, I only override the drawing code.

I would like any comments on subjects like:

* What would be the correct name for this class? ThemeWin32Native, 
ThemeWin32UX, ThemeWimp (like the GTK Windows impersonator), etc.
* Until now, I needed to change visibility of at least one member of a 
winforms control (Button.IsDefault) from "protected" to "protected 
internal". Is this acceptable?
* I guess the correct thing to do would be to create a base class 
(something like ThemeWin32Common), with code common to both Win32Classic 
and Win32Native. This is a mayor change and I am not a core Mono 
developer. Should I start such a job anyway?
* Any other comment you may feel appropriate.

Regards,
Ernesto



More information about the Mono-winforms-list mailing list