Showing posts with label Silverlight. Show all posts
Showing posts with label Silverlight. Show all posts

Monday, July 29, 2013

Header Image doesn't Display on Telerik Report through Silverlight Report Viewer

Problem: The header image doesn't display on Telerik Report when viewed through Silverlight Report Viewer. But when exported, the image is being displayed.

Solution: 
From Telerik Reporting KB Article

PROBLEM
Images, Charts, Barcodes and Shapes are not being displayed in the Silverlight report viewer.

DESCRIPTION
When a report is previewed in the Silverlight report viewer, Images, Charts, Barcodes and Shapes are missing, however they are present when exporting to one of the supported formats.

SOLUTION
The most probable reason is missing resource endpoint for the Telerik Reporting WCF Servicethat is responsible for serving all images: Picturebox, Chart, Shapes and Barcodes. For proper configuration please refer to the Hosting WCF Service in IIS help article. 
The Silverlight report viewer lives entirely on the client side, while the report rendering is performed on the server. The XAML rendering extension (used by Silverlight report viewer)streams images as resources (similar to HTML), so if the resource endpoint is missing in the service configuration, the images would not be served. When exporting, images are embeddedin the export file.


For SSL: See How to: Enable SSL for Telerik Reporting WCF service


Related Forum Thread: Embedded Image Resources not rendering in Silverlight ReportViewer

Next:
* Take a look at the Custom Binding and its use on Silverlight Application and Telerik Reporting WCF Service

Wednesday, January 30, 2013

References Not Found on .g.i.cs files

Just CLEAN and REBUILD the solution. It works! ;)

Sunday, December 2, 2012

The breakpoint will not currently be hit in Silverlight project

Solution to the "The breakpoint will not currently be hit" in Silverlight project

Solution 1:
1. Right click on the Silverlight project
2. Locate and click the Web tab
3. Make sure that the Silverlight checkbox is checked.

Solution 2: What if the Silverlight checkbox is already checked, you have already cleaned the solution, deleted the BIN and OBJ folders and still, it doesn't work?
1. Uncheck the Silverlight checkbox
2. Run the solution (the breakpoint will not work, of course!)
3. Stop running. Go the properties again and re-check the Silverlight option.
It works for me!

Solution 3: Clear the browser's cache / temporary files

Solution 4: Usually deleting the <solutionfilename>.suo file in the solution folder fixes it.



Wednesday, October 10, 2012

Convert PagedCollectionView to Original Source

ObservableCollection<SavedReport> obvColSavedReports = new ObservableCollection<SavedReport>();
                foreach (var savedReport in ((PagedCollectionView)dataGrid1.ItemsSource).SourceCollection)
                {
                    SavedReport sr = (SavedReport)savedReport;
                    if (sr.IsSelected)
                        obvColSavedReports.Add(sr);
                }


See the bold text above? That's it!

Tuesday, September 18, 2012

How to Run/Embed Flash to Silverlight?

It is not possible to run flash content inside of Silverlight or vice-versa. However, it is possible to run both types of content on the same html page. 

For a workaround, an html that is running a flash content can be overlayed to Silverlight. But, the windowless param should be true. (And this option affects the application's performance.) 

What is the flash content? Is it a video? If yes, it can be converted to Silverlight, wmv, avi or any other video formats that Silverlight supports. 

References:
http://stackoverflow.com/questions/618193/can-i-include-flash-content-inside-a-silverlight-app