Tab
A newer version of this page is available. Switch to the current version.

EditPropertiesBase.CssPostfix Property

Gets or sets a CSS class name postfix that identifies style settings to be applied to the editor.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

[DefaultValue("")]
public virtual string CssPostfix { get; set; }
<DefaultValue("")>
Public Overridable Property CssPostfix As String

Property Value

Type Default Description
String

String.Empty

A String value that represents the required CSS class name postfix.

Remarks

Use the CssPostfix property together with the EditPropertiesBase.CssFilePath property in order to define an editor's custom appearance via a separate CSS file. The CssPostfix property specifies a postfix (a custom style explanatory text) that identifies CSS class names whose settings define the editor's appearance. The CSS class names specified by the postfix are intended to be contained within the CSS file referred to by the EditPropertiesBase.CssFilePath property. In order to apply the appearance provided by the specified CSS file's settings, default class names within the file should be supplemented with a postfix defined via the CssPostfix property. Note that a class name and a postfix provided should be separated by the underline symbol - this is our internal requirement, which is required for parsing reasons.

Using postfixes solves the task of differentiating in a web browser class names which define the same appearance settings of editors in different ways. If postfixes are not used, each separate CSS file contains classes with the same default names (as can be seen in a sample CSS file invoked by a click on the "View CSS Sample" command in an editor's designer). In this case, a web browser cannot recognize and apply correct styles, since all CSS classes are named identically within different CSS files.

Note, the CssPostfix property synchronizes its value with the editor's ASPxEditBase.CssPostfix property.

NOTE

When you set the CssPostfix property, you disable not only the default CSS styles, but also the default sprites. The EditPropertiesBase control does not allow you to mix the default CSS sprite with a custom CSS. To retain the default sprite CSS, copy its code to your own CSS file.

To learn more about CSS sprites, refer to Default Implementation of CSS Sprites in DevExpress Themes and Using Custom CSS Sprites topics.

See Also