Manuel

Now I like to bind these two Buttons to a command.
For this I made a class which inherited from ReportViewerModel.
Unfortunatly this will not work. The ReportViewerModel as no contstructor.
Error Message: Telerik.ReportViewer.Silverlight.ReportViewerModel Type has no constructors defined'

My question:
How can I bind Commands to the two new Buttons in the Style?

Manuel

in passed Version of the Reporting (I guess < Q2 2011) it was working without any problems.
I do not understand why the constructor is now internal / hidden for me.

Anyway, I am using prism.
The ReportViewer is in one of the regions. On the left, right and top of the reportviewer I have three other regions.
On of the Buttons will hide the other regions (make the ReportViewer fullscreen), the other button will close the ReportViewer and show the "orginal" center region.

It would be great to bind the Commands of the TelerikViewStyle to the ViewModel.

Thank you,
Manuel

IvanY

In order to bind the commands you have first to extract the ReportViewerModel from the DataContext of the ReportViewer. Once you extract it you will be able to recover the functionality from the previous version. This is a sample how to extract the ReportViewerModel:

However ReportViewerModel in both Silverlight and WPF report viewers is intended for internal use by the controls and a better approach would be to add some external buttons that control the hiding/maximizing of the Report Viewer.

Greetings,
IvanY
the Telerik team

Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

IvanY

As the constructor of the ReportViewerModel is internal it is not possible to add new commands to the view model, you can only extract it and use the existing ones. However in your case a better approach (mentioned in one of my previous posts) would be to add some external buttons that control the hiding/maximizing of the Report Viewer, as it is just a control which can be manipulated easily in your case.