Editar

Partilhar via


StyleSheets Property

Version: Available or changed with runtime version 1.0.

Specifies the list of stylesheets to include in the control add-in. The stylesheets could be local files in the package or references to external files using the http or the https protocol.

Applies to

  • Control Add In

Property Values

A list of comma-separated strings that represent paths to stylesheet files. The default is blank, with no stylesheets being used by the control add-in.

With runtime 11, you can specify multiple files within the same path string by using a combination of a valid literal path and wildcard characters (* and ?). However, it doesn't support regular expressions.

Remarks

This property is optional and used to specify stylesheets that apply to the control add-in visuals. Stylesheets can be either external resources referenced using a URL or can be embedded within the extension. Embedded stylesheets must be added to the extension project folder in Visual Studio Code and referenced using a relative path. Stylesheets are loaded immediately when the control add-in is initialized.

Important

In extensions for Business Central online, don't reference font files in stylesheets, because the fonts won't display in client. Instead, do one of the following:

  • Reference the font files from some other source such as a public or private CDN.
  • Base64 encode the fonts and include the encoded fonts in the CSS file.

Example

Stylesheets = 'https://www.microsoft.com/stylesheets/colors.css',
              'style.css',
              'styles/*.css;

Properties
Control Add-In Object