ActiveReports 6 Online Help Send comments on this topic.
Customize the Silverlight Viewer (Pro Edition)
See Also
ActiveReports 6 > ActiveReports User Guide > How To > Customize, Localize and Deploy > Customize the Silverlight Viewer (Pro Edition)

Glossary Item Box

The ActiveReports Silverlight Viewer is a customizable control. You can easily change the look of the Silverlight Viewer and such its elements as the error panel, search panel, sidebar and toolbar by modifying properties in the default Silverlight Viewer template (DefaultSLViewerTemplates.xaml).

To add the customization template to the Silverlight project

  1. Open your Silverlight project or create a new Silverlight project as described in Silverlight Viewer (Pro Edition).
  2. In Solution Explorer, select the YourProject directory.
  3. On the Visual Studio Project menu, click Add Existing item.
  4. In the dialog that appears, locate and select DefaultSLViewerTemplates.xaml and click OK. You can find DefaultSLViewerTemplates.xaml in the C:\Program Files\Grapecity\ActiveReports6\Deployment\Silverlight\Templates folder (on a 64-bit Windows operating system, this file is located in C:\Program Files (x86)\GrapeCity\ActiveReports 6\Deployment\Silverlight\Templates).
  5. On MainPage.xaml, add the following code to the <UserControl> section:
    Paste to the UserControl section on Design view of MainPage.xaml  Copy Code
    <UserControl.Resources>
       <ResourceDictionary Source="DefaultSLViewerTemplates.xaml" />
    </UserControl.Resources>
    

To customize the Silverlight Viewer sidebar

  1. In Solution Explorer, double-click DefaultSLViewerTemplates.xaml.
  2. In the file that opens, search for "sidebar implementation".
  3. In the Header property of <sdk:TabItem>, type "Sidebar".

    Click to EnlargeClick to Enlarge
  4. Open MainPage.xaml to see the Sidebar caption in the TOC view of the Silverlight Viewer.

    Click to EnlargeClick to Enlarge

To customize the Silverlight Viewer search panel

  1. In Solution Explorer, double-click DefaultSLViewerTemplates.xaml.
  2. In the file that opens, search for "searchpanel".
  3. Change the Color properties in the ControlTemplate section for View:SearchPanel.

    Click to EnlargeClick to Enlarge
  4. Press F5 to see the customized search panel.

    Click to EnlargeClick to Enlarge

Note: ActiveReports 6 includes several predefined themes that you can find in the C:\Program Files\GrapeCity\ActiveReports 6\Deployment\Silverlight\Templates folder.

On a 64-bit Windows operating system, you can find the predefined themes in the C:\Program Files (x86)\GrapeCity\ActiveReports 6\Deployment\Silverlight\Templates folder.

See Also