Configuration

Component Version

The version of the component libraries can be adjusted using a configuration file. By default, the premium extensions use an embedded resource configuration file to list the sources for the component vendor library. The default source is CDN. If you want to customize the distribution, read below.

Configuration File

The configuration file provides a way to list different sources required for the components. The file must have Wisej.Web.Ext.[Component Library].json as the name.

Component Library could be...

  • DevExtreme

  • Ignite

  • Kendo

  • Syncfusion

  • Syncfusion2

  • Webix

Wisej.Web.Ext.Syncfusion2.json
{
  //
  // Specifies which set of packages to use from the "sources" map below.
  //
  "source": "cdn",

  //
  // Specifies the default theme. Used when the Theme property of the widget is not set.
  //
  "theme": "bootstrap5",

  //
  // Widget packages.
  //
  "sources": {
    "cdn": {
      "root": "https://cdn.syncfusion.com/ej2",
      "packages": {
        "ej2.js": "%root%/dist/ej2.min.js",
        "theme.css": "%root%/%theme%.css"
      }
    },
    "local": {
      "root": "Syncfusion2",
      "packages": {
        "ej2.js": "%root%/dist/ej2.min.js",
        "theme.css": "%root%/%theme%.css"
      }
    },
    "embedded": {
      "root": "resource.wx",
      "packages": {
        "ej2.js": "%root%/dist/ej2.min.js",
        "theme.css": "%root%/%theme%.css"
      }
    }
  }
}

Samples

You can find sample configuration files for each of the component vendors here.

Localization

Components can be localized by applying a new value to the xxBase.Culture static property.

For example:

// DevExtreme.
dxBase.Culture = new CultureInfo("de-DE");

// Syncfusion.
ej2Base.Culture = new CultureInfo("en-US");

When applying the culture, all %locale% variables in the configuration file will be replaced with the two letter ISO language name (i.e. "en-US" = "en").

All %culture% variables in the configuration file will be replaced with the full name (i.e. "en-US" = "en-US").c#

Themes

Components can set a new theme by applying a new value to the xxBase.Theme static property.

// DevExtreme.
dxBase.Theme = new "material.blue.light";

// Syncfusion.
dxBase.Theme = "bootstrap5";

When applying a theme, all %theme% variables in the configuration file will be replaced with the value specified in xxBase.Theme.

Deployment

In general, two resources need to be deployed to your server:

  • Customized configuration files (unless embedded within project).

  • Local component library builds.

CDN

The default option. The premium extensions will use the CDN sources provided in the configuration file (default embedded or customized).

Local

Local deployment requires that all the component source files are included in the deployment to the server. The files should be located within a subdirectory under the project root that corresponds to the component library name.

Embedded

When deploying the component source files as embedded resources, the files do not need to be copied to the server. The resources should follow the same structure as was delivered from the component vendor.

Last updated