Completed
Last Updated: 24 Nov 2021 09:26 by ADMIN
Release R2 2019 SP1
Brandon
Created on: 31 May 2019 22:00
Type: Bug Report
0
Cannot find resource named 'RepeatButtonStyle' design time exception in Green theme (NoXaml)

I put a ReportViewer in an application and VisualStudio inserted the required MergedDictionaries.  I updated them to the Green theme and added the Green reference, now I get a XAML error stating Cannot find resource named 'RepeatButtonStyle.'  I comment out this line in my App.xaml file:

<!--<ResourceDictionary Source="/Telerik.ReportViewer.Wpf.Themes;component/Themes/Green/Telerik.Windows.Controls.Navigation.xaml" />-->

the error goes away and my XAML designer works again, but the navigation section of the report viewer has the incorrect theme applied.

I looked in the copy of the file that is on my computer located at:

   C:\Program Files (x86)\Progress\Telerik Reporting R2 2019\Wpf\Themes\Green\Telerik.Windows.Controls.Navigation.xaml

On line 8831 there is a reference to a Static Resource named RepeatButtonStyle.

<Style x:Key="TabbedWindowScrollButtonStyle" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}">

I assume this the culprit?

There was a similar issue in February.

https://feedback.telerik.com/wpf/1384801-pdfviewer-cannot-find-resource-named-repeatbuttonstyle-design-time-exception-in-fluent-theme-noxaml

4 comments
ADMIN
Sia
Posted on: 24 Nov 2021 09:26

Hello Brandon,

First, please excuse me for the late follow-up.

I will provide some details regarding the reported issue below.

I have researched it on our end and it seems that it was caused by a change introduced by the WPF team related to a new TabbedWindow control in R2 2019.

There were some missing static resources in the Navigation xaml as you had noticed.

A fix was provided one week later with the first internal build of Telerik UI for WPF .

The first official version of Telerik Reporting with the fix (that depends on WPF) was released with R2 2019 SP1.

Regards,
Sia
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
ADMIN
Ivan Hristov
Posted on: 11 Jun 2019 11:06
Hello Brandon,

Thank you for the additional details provided. The steps you're following are correct and I again went through them to make sure everything works as expected. On my side I was unable to reproduce any problem, so I still think the problem is related with non-matching assembly versions. In case you use Telerik.Reporting 13.1.19.514, make sure the version of WPF assemblies Telerik.Windows.ControlsTelerik.Windows.Controls.InputTelerik.Windows.Controls.Navigation and Telerik.Windows.Data is 2019.2.510.40 or 2019.2.510.45, because this is the version of WPF controls used by Telerik Reporting R2 2019 - see the related Upgrade Path article. In case you are using a higher version of the WPF assemblies, make sure you have added binding redirects, as shown here.

I would also like to thank you for pointing out the documentation step that might be confusing to our users. By "required assemblies" we meant the Themes assembly itself along with the assemblies needed to load the Telerik.ReportViewer.Wpf.Themes.dll. These assemblies are mscorlib, System and PresentationFramework, which must be already referenced in any WPF project. That's why we decided to shorten the line to Add reference to the Telerik.ReportViewer.Wpf.Themes assembly

Another thing we occasionally stumble upon is that in the project's \Bin\Debug folder the assemblies are not overwritten correctly and in some cases the application might load a different version of the referenced assembly. I suggest to delete the \Bin\Debug folder of your project and rebuild it to make sure the assemblies inside will be the same as the referenced ones.

I'm attaching the original project with all the references configured properly - the Reporting assemblies are version 13.1.19.514 and WPF assemblies are version 2019.2.510.45. On my computer it works as expected, as shown in the previously attached video, so I hope the attached project will help you to determine where's the problem when it runs on your side.

And, of course, if you need further assistance, please do not hesitate to ask.

Regards,
Ivan Hristov
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Attached Files:
Brandon
Posted on: 07 Jun 2019 18:07

Hi Ivan,

I checked the modules as you suggested and I have the same module loaded as in your screenshot, I have attached that image (ModuleLoaded.png).

Since I'm not sure what else to try, I have gone back to the documentation located here:

https://docs.telerik.com/reporting/wpf-report-viewer-implicit-styles#Setting_ImplicitStyle_WPF_ReportViewer_EasyUpdate

and attempted to correct whatever is wrong with my references.  I have attached a screen shot of the steps with numbers (ImplicitStyleDoc.png).

1. Step one tells me to replace the reference Tereik UI for WPF assemblies. These are the assemblies I am referencing and the file path for each one:

  • Telerik.Windows.Controls
    • C:\Program Files (x86)\Progress\Telerik UI for WPF R2 2019\Binaries.NoXaml\WPF45\Telerik.Windows.Controls.dll
  • Telerik.Windows.Controls.Input
    • C:\Program Files (x86)\Progress\Telerik UI for WPF R2 2019\Binaries.NoXaml\WPF45\Telerik.Windows.Controls.Input.dll
  • Telerik.Windows.Controls.Navigation
    • C:\Program Files (x86)\Progress\Telerik UI for WPF R2 2019\Binaries.NoXaml\WPF45\Telerik.Windows.Controls.Navigation.dll
  • Telerik.Windows.Data
    • C:\Program Files (x86)\Progress\Telerik UI for WPF R2 2019\Binaries.NoXaml\WPF45\Telerik.Windows.Data.dll
  • Telerik.Windows.Themes.Green
    • C:\Program Files (x86)\Progress\Telerik UI for WPF R2 2019\Binaries.NoXaml\WPF45\Telerik.Windows.Themes.Green.dll

I think that is all step one is requiring since I'm not only using the assemblies for the report viewer.  Correct?

2. This is the step where I do not understand what I should be doing.  What are the 'required assemblies' for this example.  I assumed I needed these:

  • Telerik.Reporting 
    • C:\Program Files (x86)\Progress\Telerik Reporting R2 2019\Bin\Telerik.Reporting.dll
  • Telerik.Reporting.OpenXmlRendering.2.7.2 
    • C:\Program Files (x86)\Progress\Telerik Reporting R2 2019\Bin\Telerik.Reporting.OpenXmlRendering.2.7.2.dll
  • Telerik.ReportViewer.Wpf 
    • C:\Program Files (x86)\Progress\Telerik Reporting R2 2019\Bin\Telerik.ReportViewer.Wpf.dll
  • Telerik.ReportViewer.Wpf.Themes 
    • C:\Program Files (x86)\Progress\Telerik Reporting R2 2019\Bin\Telerik.ReportViewer.Wpf.Themes.dll

    But maybe I'm getting the wrong DLLs on this step?

3.  The 3rd step is really obvious and simple enough to replicate.


Thank you for your patience and assistance in getting these references corrected.

ADMIN
Ivan Hristov
Posted on: 07 Jun 2019 10:48
Hello Brandon,

Thank you for providing the necessary files and screenshots. Unfortunately I was unable to reproduce the issue, because when I loaded your project and configured the references, it worked as expected with applied Green theme, as you can see in this video: https://www.screencast.com/t/lsgUb6d6o2k
I believe the problem was caused by the explicitly referenced Green theme, because it doesn't contain the necessary styles for Report Viewer. The WPF Report Viewer uses a variation of the WPF themes tailored for its controls. Although you correctly specified that the green theme should be obtained by the resources of the Telerik.ReportViewer.Wpf.Themes assembly, probably for some reason the styles were loaded from the Telerik.Windows.Themes.Green assembly, which doesn't contain the report viewer styles.

My suggestion is to check again the references on your side and make sure the assembly Telerik.ReportViewer.Wpf.Themes is really loaded when the application is started - the easiest way to do so is to check the Modules tab in Visual Studio, as shown in the attached screenshot.

Hope this helps.

Regards,
Ivan Hristov
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items