[Mono-winforms-list] Theming in MWF

Jordi Mas jordi at ximian.com
Fri Jul 29 06:25:51 EDT 2005

El dv 29 de 07 del 2005 a les 12:31 +0200, en/na Pedro Martínez Juliá va

Hola Pedro,

> I've seen the implementation of themes in MWF and I'm not agree at all
> of having theming in this stage of the development. I know that MS.NET
> has themes but I think that themes are implemented in Windows because I
> didn't see anything related in MSDN documentation.

That's right, MS .NET System.Windows.Forms uses Windows Theme API.

> I saw that Theme.cs has a lot of painting logic and I think it shouldn't
> be there. For example, DataGridPaintRows iterates the rows of a datagrid
> to paint each one. I think that it should be in DataGrid and not in the
> theme class.

You right, ThemeWin32Classic.cs has sometime logic that should be
somewhere else, in this case clearly in the internal
DataGridDrawingLogic class. I'll review those methods.

> The problems I see in this issue is that I can implement a Theme that
> changes the view of any control and in the other hand, this theming
> engine doesn't allow a user to easily download and install a theme.
> At the end, we have only Win32Classic theme maintained and it adds one
> level to the indirection at the time to paint any control.
> For all of this I think we can redesign now the theming. It's only an
> idea.

The original idea behind the Theme API was to isolate in a single place
all the decorations, colours, and things that were suitable to be
themed. For my taste, ThemeWin32Classic.cs has become too heavy. We
should review that.

Thanks for your comments Pedro,


Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas

More information about the Mono-winforms-list mailing list