[Mono-winforms-list] Theming in MWF

Kornél Pál kornelpal at hotmail.com
Fri Jul 29 06:44:50 EDT 2005


Hi,

MS.NET has no theming support. Theming means that it would be able to draw
contorls and/or windows using custom functions. There is no such support in
MS.NET.

It has an Application.EnableVisualStyles method that enables using Visual
Styles. Visual Styles are provided by Windows not by MS.NET.

All that Application.EnableVisualStyles does is that it loads comctl32.dll
version 6.0.0.0 using a manifest file through Windows side-by-side assembly
support and the initializes comctl32.dll.

By default controls are drawn by MS.NET so you have to use FlatStyle.System
to let Windows draw the controls using visual styles.

For more information see:
EnableVisualStyles:
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwindowsformsapplicationclassenablevisualstylestopic.asp

Visual Styles:
http://msdn.microsoft.com/library/en-us/dnwxp/html/xptheming.asp

Side-by-side Assemblies:
http://msdn.microsoft.com/library/en-us/sbscs/setup/about_isolated_applications_and_side_by_side_assemblies.asp

Mono draws contorls itself (just like MS.NET) that provides identical
appearance across all platforms.

Enabling custom themes is a good idea but it cannot be done in MWF because
it has to be compatible with MS.NET implementations.

Kornél

----- Original Message -----
From: "Pedro Martínez Juliá" <pedromj at gmail.com>
To: "Mono Winforms" <mono-winforms-list at ximian.com>
Sent: Friday, July 29, 2005 12:31 PM
Subject: [Mono-winforms-list] Theming in MWF


>
> Hi,
>
> 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.
>
> 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.
>
> 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.
>
> Regards,
>
>    Pedro
>
> --
> Pedro Martínez Juliá
> \   pedromj at gmail.com
> )|      Jabber: petrux at jabber.org
> /           MSN Messenger: yoros at wanadoo.es
> Socio HispaLinux #311
> Página web: http://pedromj.dyndns.org
> Usuario Linux #275438 - http://counter.li.org
>
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>



More information about the Mono-winforms-list mailing list