XtraReport.StyleSheetPath Property
Gets or sets the path to the style sheet contained in a style sheet file.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v18.2.dll
Declaration
Property Value
Type | Description |
---|---|
String | A String containing the full path (including the file name and extension) specifying where the style sheet file is located. |
Remarks
Use this property to specify the report’s style sheet if it’s stored in a file. This can be very useful, for instance, when a report contains labels that have styles assigned by their names, and these styles can then be changed at runtime simply by changing the StyleSheetPath property’s value to a different file path. The style sheet file can be created in the report designer via the StyleSheet Editor window invoked via the XtraReport.StyleSheet property.
Note that the styles loaded from a style sheet file have a higher priority than the styles which exist in a report’s style sheet, returned by the XtraReport.StyleSheet property. This means that if the styles stored in the report have the same names as the styles loaded from a style sheet file, then the styles in the file will substitute their namesakes. And, the styles loaded from a file can’t be edited in a report.
If the StyleSheetPath property is then set to String.Empty, all the styles loaded from a style sheet file will be removed.
Note
For more information on using this property, refer to the following tutorial: Storing Report Style Sheets.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the StyleSheetPath property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.