Customization of ReportViewer's User Interface


Generic.xaml contains the markup of ReportViewer control's template.

For example, we need to change "No report to display" text in our ReportViewer.

In Generic.xaml we find "NoReportPresenter" style, make some change and put the code into our MainPage.xaml:

<rss:ReportViewer x:Name="reportViewer">
        <!-- NoReportPresenter -->
        <Style TargetType="rss:NoReportPresenter">
            <Setter Property="Template">
                   <ControlTemplate TargetType="rss:NoReportPresenter">
                        <Grid x:Name="Root" Cursor="Arrow" Width="2000"
                            <Rectangle Fill="LightGray"/>
                            <TextBlock Text="Report. Coming soon."

This example also shows how to enable mouse cursor in specified area while report is not displaying.

Cursor="Arrow" Width="2000" Height="2000"

By default it is disabled.

Add Feedback