A custom control is not displayed in the WPF/Silverlight Viewer.

You might probably face the following problem: 
You added a custom control to a report designer, but anyway a rendered report does not display it. This may be caused by the fact that when your report is rendered, it is exported to XAML.
For each delivered control, the assemblies include the corresponding XAML adapters, but since you use a custom control, the rendering mechanism does not understand them.
To make the report viewer display custom control, override the Render method of the control the following way CustomReportControlDemo.zip:

/// <summary>
/// Fills the properties of the final rendered shape.
/// </summary>
/// <param name="production"></param>
protected override void PopulateProperties(ReportControl production)
  CheckBoxReportControl p = production as CheckBoxReportControl;
  p.ExportAsPictureInXaml = true;
  p.Checked = Checked;
  p.Color = Color;

Please pay attention to the p.ExportAsPictureInXaml = true line. When preparing a report this line of code helps exporting a custom control into a picture and embeds it to the resulting XAML.

Add Feedback