I would like to generate a small Preview Image of the fist page of a FlowDocument (imagine a Thumbnail View of a collection of FlowDocuments). Can anyone recommend a good approach for doing this?
views:
38answers:
1
A:
You should be able to do this by making your FlowDocument display the first page as you want it to appear in the thumbnail, then pointing a RenderTargetBitmap to the FlowDocument and saving the bitmap to disk. There is some code to do this in this article:
Roland Acton
2010-10-12 23:21:17
Remember that the size of your flowdocument will have a bearing on how quickly it will load. As such, you may want to pre-generate and cache the bitmap before you end up needing it in your application.
Hugo
2010-10-14 04:14:58