WPF ReportViewer Inheritance

3 posts, 0 answers
  1. developer
    developer avatar
    10 posts
    Member since:
    Jul 2014

    Posted 12 Nov 2014 Link to this post

    Hi guys.

    I need to have a localized ReportViewer, so i tried to inherit from Telerik.ReportViewer.Wpf.Reportviewer. I know that there are many workarounds to localize the control without inheritance, but I think that in my situation is the best way.

    So, i tried to inherit from Telerik.ReportViewer.Wpf.Reportviewer, I created a class that implements the ITextResources interface and I tried to use the control, but it doesn't appear on the window anymore!

    (I was using implicit style for the control in this way)
                   <ResourceDictionary Source="/Resources/Themes/System.Windows.xaml"/>
                   <ResourceDictionary Source="/Resources/Themes/Telerik.Windows.Controls.xaml"/>
                   <ResourceDictionary Source="/Resources/Themes/Telerik.Windows.Controls.Input.xaml"/>
                   <ResourceDictionary Source="/Resources/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
                   <ResourceDictionary Source="/Resources/Themes/Telerik.ReportViewer.Wpf.xaml"/>
  2. Stef
    Stef avatar
    3610 posts

    Posted 14 Nov 2014 Link to this post


    As of Q1 2014 Telerik Reporting WPF/Silverlight ReportViewer controls use only implict styles. For more details please refer to the Setting a theme of the WPF/Silverlight Report Viewer (Q1 2014 and later) blog post and How to: Add report viewer to a WPF application help article.

    About localizing the WPF ReportViewer, you can check the general approaches listed in the Report Viewer Localization help article.

    I hope the above information helps you.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. developer
    developer avatar
    10 posts
    Member since:
    Jul 2014

    Posted 27 Nov 2014 in reply to Stef Link to this post

    I solved my problem, this was the solution:

    If you don't use Implicit Style on a ReportViewer it won't be displayed on the Window.
    When I tried to apply Implicit Style on my inherited ReportViewer nothing happened because my control wasn't a Telerik ReportViewer anymore, so I had do define a new Implicit Style for my ReportViewer cloning the Telerik.ReportViewer.Wpf.xaml file and then everything works fine!
Back to Top