A newer version of this page is available. Switch to the current version.

WebApplication.SwitchToNewStyle() Method

Enables the new web UI optimized for touch devices.

Namespace: DevExpress.ExpressApp.Web

Assembly: DevExpress.ExpressApp.Web.v18.2.dll


public void SwitchToNewStyle()
Public Sub SwitchToNewStyle


In recent XAF versions, the theme and web page templates optimized for touch devices are enabled by default. To enable them in applications created in versions prior to 15.2, edit the Global.asax.cs (Global.asax.vb) file and call the SwitchToNewStyle method from the Global.Session_Start method after the WebApplication.SetInstance method is executed.

protected void Session_Start(object sender, EventArgs e) {
    WebApplication.SetInstance(Session, new MySolutionWebApplication());
    // ...

As a result, the web application UI changes as follows:


SwitchToNewStyle method calls are ignored after a user is logged on. The last place in code where you can call this method is the XafApplication.LoggedOn event handler. You can cancel the SwitchToNewStyle method effect using the WebApplication.SwitchToOldStyle method.

To learn more, refer to the ASP.NET Web Application Appearance topic.

See Also