ASP.NET Themes In DLL: Easy Theme Deployment

22 July 2009

Check out this great new ASP.NET Theme feature in the DevExpress DXperience 2009 volume 2 release:

Single DLL For ASP.NET Skins/Themes

Single DLL For Easier Deployment

DevExpress ASP.NET Controls now provide a single DLL file that has all the themes packaged within it.

This makes it much easier to deploy our components with the themes. Instead of having to deal with multiple CSS files and images in a hierarchical folder structure (subfolders), all you need now is to copy the DevExpress.Web.ASPxThemes.v9.2.dll file.

The DevExpress.Web.ASPxThemes.v9.2.dll file can typically be found in the following folder:

C:\Program Files\DevExpress 2009.2\Components\Sources\DevExpress.DLL\

New HTTP Handler Benefit

The new DevExpress HTTP Handler takes care of obtaining all the required resources for the selected ASP.NET control’s theme. In fact, the theme images and CSS are in a compressed state within the single DLL. And all you need to deploy our controls is to move the themes DLL file - images in sub-folders are not needed anymore.

Where’s AppThemes?

Because the theme files are now packed in a single DLL file, the ASP.NET AppThemes folder is no longer required by our ASP.NET controls when you choose one of our default themes. For example, here’s a screenshot of the ASPxGridView with the ‘Red Wine’ theme applied:

Visual Studio 2008: No AppThemes Folder

Did you notice how there’s no AppThemes folder in the Visual Studio project? Smile 

[UPDATE] Yes, if you apply a theme to our controls as an ‘AutoFormat’ then the AppThemes folder isn’t necessary. However, if you use our themes as standard ASP.NET themes then you’ll need the files in your AppThemes folder. To learn how to copy them over, check out the follow-up to this post: Custom ASP.NET Themes And The New ASP.NET Skins DLL [/UPDATE]


The DevExpress DXperience 2009 volume 2 release packs a ton of great new stuff to play with. Check out some of the other features included in this release:


DXperience? What's That?

DXperience is the .NET developer's secret weapon. Get full access to a complete suite of professional components that let you instantly drop in new features, designer styles and fast performance for your applications. Try a fully-functional version of DXperience for free now:

Peter Thorpe

Love it. Copying all those individual small files can be really slow I don't just have to do it to the web server, sometimes I am copying a project onto a different computer and it can take a while.

Wondering though currently in the app themes folder I add an extra styles.css and background image. This lets me customize the rest of page settings based on the theme set by the user for the devexpress controls.

Can I still achieve this by just copying in files or would I have to do this programatically.

22 July, 2009
Mehul Harry (DevExpress)

Thanks Peter,

Answer is yes. I'll post about the custom themes soon.

22 July, 2009
Matthew MacSuga

Will we still be able to use the normal non-dll based themes ?  There are instances where it's beneficial to modify something contained within the theme directories.. an image, css, etc.. and even view them.

Neat though!  I wish you could combine some of your other things into a single DLL too :P

- Matthew

22 July, 2009

It's magic?  No wait, it's Mehul! :)

Can't wait for this with that "server installation" to really make things simple! :)

22 July, 2009
Jim Leary

Is there any indication yet on how this might effect performance (positively or negatively!)?

22 July, 2009
Brien King

Ok, if we use this and we need to customize a theme, how does that work?  Can we create our own Theme DLL based on the customized theme or do we have to revert to the old way of copying files?

22 July, 2009

Thanks for all the blogs and videos. Your work is appreciated!!.

Is there a reason why you deviate from the .NET standard for App_Themes?

One of the reasons (I would say main) we like your product is that you are the most aligned in technology with MS.

Would it not be better to have the dll, but link it to App_Themes?

22 July, 2009
Grant Dunoon

For the wish list: I would like to see a jQuery UI web style editor for the devx controls. This would make it easy to keep up with changes in the corporate/client colours. Stick it in dll, now that would be cool! Thanks.

22 July, 2009
Geoff Appleford

How does this affect client side caching?

23 July, 2009
Chloe Anfield

Does this work with XAF ? The reason I ask is that I'm testing the 9.2 build, and yesterday created a new XAF application. The App_Themes folder and content is still very much present. Is this perhaps an issue with the addin which generates new XAF solutions ?

23 July, 2009

Cool news! How we should now adjust the custom themes?

23 July, 2009

That is GREAT! :D

23 July, 2009


23 July, 2009

Whoohoo!!! You make me happy!

Now are all of the themes complete and ready to use with the default theming in properly instead of some being complete and others being hack jobs that require major work or tons of markup per page (Black theme being one of them)?

Please say that they're complete with skin files!

23 July, 2009
Mehul Harry (DevExpress)

Hi Matthew,

Thanks and yes!

We have full backward compatibility.  If the Themes.dll is unavailable then the images and css will be retrieved like file resources.

Also, we have an idea to have an options to prevent using Themes.dll even if it's available. Something like the "DXUseThemesDll" AppSetting in the web.config file. It's necessary if a customer uses a modified copy of our theme placed in the App_Themes folder. I'll blog about this feature when once its implemented.

24 July, 2009
Mehul Harry (DevExpress)

Thanks Neal.

Also check out the follow up to this post:

24 July, 2009
Mehul Harry (DevExpress)

Hi Jim,

I believe the performance is increased a little because of the compression and merging of css file:

24 July, 2009
Mehul Harry (DevExpress)


Check out the follow-up post to this article here:

We're also going to work on a piece for the docs and I'll likely make a screencast which walks through the process.

24 July, 2009
Mehul Harry (DevExpress)

Thanks Kris,

The main reason is to reduce the size of the installation. Also to reduce a large number of the small files in the installation.

Of course, the simple website deployment is a big reason as well.

Anyways, you can still use the classic approach without any issues.

24 July, 2009
Mehul Harry (DevExpress)


This might be because the eXpress App Framework app might be using the ASP.NET theme approach to apply the theme to the entire site.

24 July, 2009
Mehul Harry (DevExpress)

Marcelo, Crono, Juana,


Btw Marcelo, check out this post for custom themes:

24 July, 2009
Mehul Harry (DevExpress)


I recommend creating a suggestion in the support center.

24 July, 2009
Mehul Harry (DevExpress)


Caching works the same as with standard resources because of the same HttpHandler is used for the Themes.dll.

24 July, 2009
Mehul Harry (DevExpress)

Thanks James,

If you find an issue with any of the themes, please report it to the support center and we'll get it fixed:

24 July, 2009

We're just about to release v2009.2 and it would be a good idea to have an "accumulator"

20 August, 2009
DotNetBurner -

DotNetBurner - burning hot .net content

12 September, 2009
Josh Sommers

FYI- My report toolbar lost all of it's images with the 9.2 update. The project converter did not automatically add the themes dll to my project. The odd thing is that it worked fine before, but the images for the report toolbar do not seem to exist anywhere within the app_themes folder, so I don't know how it worked before the update, but it did. Once I added the themes.dll to the project and uploaded that to the server, the toolbar got it's images back.

28 October, 2009
Mehul Harry (DevExpress)
28 October, 2009
Olaf Monien

I definitely like the idea of having that single Theme.dll, but there is either an important piece missing in its architecture or I am misunderstanding something:

As we have learned, to use the Theme dll, you have to use the "AutoFormat" setting. For a single page with three controls on it, this is certainly a viable approach. For realworld applications though with dozens of pages, each with dozens of controls on it, I don't see how this would be practical.

In other words, realisticly (for non-hellow-world apps that is) you will want to be able to set a theme in a centralized manner. Unless I miss something here, the only way is the Page.Theme attribute (via code or web.config) - but then the Theme.dll won't work, as this only seems to work if there is a physical App_Themes folder. Making Theme.dll useless ...

Any ideas?



29 January, 2010
Mehul Harry (DevExpress)

Hi Olaf,

First, use ASP.NET Themes, not autoformats. And having a reference to themes.dll is not enough, it's necessary to unpack skin files to the site using the ASPxThemeDeployer tool. This video may help you:

Thanks and sorry for the delay in response. Found this while clearing out inbox. :)

24 February, 2011

Please login or register to post comments.