问题
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