ReportWizardTemplate.ImageClassName Property
Specifies the CSS class of the report template thumbnail.
Namespace: DevExpress.XtraReports.Web.ReportDesigner.DataContracts
Assembly: DevExpress.XtraReports.v24.1.Web.dll
NuGet Package: DevExpress.Web.Reporting.Common
Declaration
Property Value
Type | Description |
---|---|
String | The CSS class name. |
Remarks
Do the following to specify a thumbnail for the report template in the Report Wizard:
Create an image file (
InstantReportCheck.png
- 96x96 pixels).Create a CSS file (
reportWizardCustomization.css
) with the image class:.instant-report-image { background-image: url('InstantReportCheck.png'); background-repeat: no-repeat; background-position: center; background-size: 70px 96px; }
Link the
reportWizardCustomization.css
file to the page:... <link href="~/reportWizardCustomization.css" rel="stylesheet" />
Assign the
instant-report-image
CSS class name to theImageClassName
property of the current template:public override void CustomizeReportTypeList(ReportWizardTemplateCollection predefinedTypes) { predefinedTypes.Remove(predefinedTypes.Where(x => x.ID == nameof(ReportType.CrossTab)).First()); predefinedTypes.Add(new DevExpress.XtraReports.Web.ReportDesigner.DataContracts.ReportWizardTemplate() { CanInstantlyFinish = true, ID = nameof(CustomReportType.InstantReport), Text = "Instant Report", ImageTemplateName = "instant-report" }); predefinedTypes.Add(new DevExpress.XtraReports.Web.ReportDesigner.DataContracts.ReportWizardTemplate() { CanInstantlyFinish = true, ID = nameof(CustomReportType.InstantReport), Text = "Instant Report", ImageClassName = "instant-report-image" }); predefinedTypes.Add(new DevExpress.XtraReports.Web.ReportDesigner.DataContracts.ReportWizardTemplate() { ID = nameof(CustomReportType.CustomLabelReport), Text = "Custom Label Report", ImageTemplateName = "dxrd-svg-wizard-LabelReport" }); }
The result is shown in the following image:
Note
This method does not apply color schemes to icons automatically.