locked
Export a silverlight user control to PDF or Excel RRS feed

  • Question

  • Hi i have a silverlight user control with some grids and lisboxes and data binded.

    I want to export the User control to PDF and Excel.

    Can any one suggest some ideas.

    Thanks

    Dileep Namburu

     

    Friday, October 28, 2011 10:46 AM

Answers

  • What purpose will exporting the user control to PDF or Excel serve?

    If you just need to create an image of the user control and embed it in a file, you can use the WritableBitmap class in SL to create an image from the user control, then use a PDF or Excel library to embed that image into the file (probably easiest to send it to the server where you normally have more powerful Excel / PDF libraries available).

    If you need to create an input PDF or Excel sheet based on the data / layout of your user control, you need to do this manually by mapping your user control data structure(s) to a PDF or Excel format. You will still need a library of some sort to create the PDF or Excel files, so my suggestion is to take a look at codeplex.com and see if you can't find a suitable library there.

    Friday, October 28, 2011 3:46 PM