Ticket T485984
Visible to All Users

How could I enable Skin Selection option in XAF web project

created 8 years ago

In your examples I found a skin selection option in web application.   But I couldn't find that link in my XAF web application.

Please let me know about this.

With thanks and regards,
Manoj

Answers approved by DevExpress Support

created 8 years ago (modified 8 years ago)

Hello Manoj,

Would you please post a screenshot of the feature you saw in our examples?

It looks like you are talking about the Classic Web UI and its Choose Theme action. Refer to the corresponding section under the Concepts > UI Construction > ASP.NET Web Application Appearance  article to learn more about it.

The New Web UI, which you are likely using, provides only one theme so far, so there is no skin selector for it. On the other hand, you can enable the capability to select predefined theme font and base color, as shown in our XCRM demo.
To add and customize this feature in your project, do the following:

  1. Copy and include the "C:\Users\Public\Documents\DevExpress Demos 16.2\Components\eXpressApp Framework\XCRM\CS\XCRM.Web\BaseColorSelector" folder in the YourSolutionName.Web project.
  2. Copy and include the "C:\Users\Public\Documents\DevExpress Demos 16.2\Components\eXpressApp Framework\XCRM\CS\XCRM.Web\CustomDefaultVerticalTemplateContent.xx" files in the YourSolutionName.Web project and optionally customize the custom template in Visual Studio to meet your business requirements.
  3. In the YourSolutionName.Web/Global.asax.cs file, add the WebApplication.Instance.Settings.DefaultVerticalTemplateContentPath = "CustomDefaultVerticalTemplateContent.ascx"; line to the Session_Start method after the WebApplication.SetInstance call.
  4. In the YourSolutionName.Web/Global.asax.cs file, add the following method into the Global class:
C#
protected void Application_BeginRequest(object sender, EventArgs e) { ASPxWebControl.GlobalThemeBaseColor = DevExpress.Web.Demos.Utils.CurrentBaseColor; ASPxWebControl.GlobalThemeFont = DevExpress.Web.Demos.Utils.CurrentFont; }

Refer to the Task-Based Help > How to: Customize an ASP.NET Template article to learn more about this customization process.

I am looking forward to hearing of your results.

    Comments (2)
    M M
    Martin Praxmarer - DevExpress MVP 8 years ago

      just tried this Feature and could not get it running until i found that you also Need to add

      Code
      protected void Application_BeginRequest(object sender, EventArgs e) { ASPxWebControl.GlobalThemeBaseColor = Utils.CurrentBaseColor; ASPxWebControl.GlobalThemeFont = Utils.CurrentFont; } in the global.asax.cs ;)
      Dennis Garavsky (DevExpress) 8 years ago

        @Martin Praxmarer: Thanks for your help!

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.