How do I change a DevExpress project's theme after creation?

不问归期 提交于 2019-12-10 12:17:34

问题


I've created a DevExpress Web project (.NET) and picked a theme in the wizard. I'm now having some sizing issues with the theme and can't figure out how to change the theme without creating a new project and going through the wizard again, and then copying my code to the new project.

I'm assuming there's a setting somewhere that I'm missing. Can someone point me in the right direction?


回答1:


Source: Project Wizard documentation

The Choose Theme tab allows you to specify a theme to be applied to your site. You can use Available Themes or add a custom theme from a dll file.

The selected theme specifies the theme settings of the devExpress configuration section.

aspx

<devExpress>
     <themes enableThemesAssembly="true" styleSheetTheme="" theme="Aqua" />
     ...
</devExpress>

Source: Web Application Template

  • The template registers the devExpress Element and adds it with the default settings to the Web.config file.

aspx

<configSections>
     <sectionGroup name="devExpress">
          <section name="themes" type="DevExpress.Web.ASPxClasses.ThemesConfigurationSection, DevExpress.Web.v12.1, Version=12.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
          <section name="compression" type="DevExpress.Web.ASPxClasses.CompressionConfigurationSection, DevExpress.Web.v12.1, Version=12.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
          <section name="settings" type="DevExpress.Web.ASPxClasses.SettingsConfigurationSection, DevExpress.Web.v12.1, Version=12.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
          <section name="errors" type="DevExpress.Web.ASPxClasses.ErrorsConfigurationSection, DevExpress.Web.v12.1, Version=12.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
     </sectionGroup>
</configSections>
...
<devExpress>
     <themes enableThemesAssembly="true" styleSheetTheme="" theme="DevEx" />
     <compression enableHtmlCompression="false" enableCallbackCompression="true" enableResourceCompression="true" enableResourceMerging="true" />
     <settings rightToLeft="false" />
     <errors callbackErrorRedirectUrl="" />
</devExpress>
  • The template specifies Web.config options that you set in the Wizard.

Go through these documentation links and try to modify these settings as you require.



来源:https://stackoverflow.com/questions/14593633/how-do-i-change-a-devexpress-projects-theme-after-creation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!