Reputation: 10997
I have a Silverlight application that has a DataGrid. I need to print the selected items in the DataGrid. However, I do not want to use a WritableBitmap. Is there a way for me to pass just those items to either a WCF Service or a .aspx page and render HTML that will prompt the user to print? If so, how?
Thank you,
Upvotes: 1
Views: 331
Reputation: 2195
Prior to SL4:
Upvotes: 1
Reputation: 14589
If you're using Silverlight 4, you could use the printing API, but I guess you would not ask this question in this case.
In Silverlight 3, I think you have to resort to some kind of hack, where you SL code calls a JavaScript function, giving it the selected data in some format. This function could open a new window where the data is re-displayed in a print-friendly format and then printed.
I mention a new window, because I guess the window hosting the SL content already has some content that is unrelated to the data to print.
Upvotes: 2