This example illustrates how to change themes on the fly. For this, use one of the following approaches:
1) ASP.NET mechanism. Use the Page.Theme property to apply a theme to a page.
2) DevExpress mechanism. Use the ASPxWebControl.GlobalTheme property to set a theme to a page.
In both cases, a theme should be specified in the Page_PreInit event handler.
Note:
To switch between different mechanisms, use the ASP.NET way and DevExpress way links on the Default.aspx page of the example.
Question Comments
Added By: Jean-Luc Praz at: 2/1/2013 6:08:10 PM
The links "ASP.NET Themes In DLL: Easy Theme Deployment" and "How To Deploy DevExpress ASP.NET Themes" do not seem to work anymore
Added By: A G 4 at: 3/1/2013 6:00:03 PMThe online sample does not work.
I downloaded the sample and this does work, but only contains one page. It is stated that it can apply to all pages, but the mentioned Utils file with the BasePage class is not included. How about adding it?
Hello,
There is a problem with master page with Page_PreInit event.
I want to change theme from a master page and i cannot do it.
Could you mind giving an example to do the scenario on master page?
I do not want to apply theme changing codes on all Pages.
Thank you.