Hello, Is there an easy way to convert a WPF visual into an image? If so, what's the code?
+2
A:
It's not terribly difficult although you will probably want to wrap up functionality. I would take a look at RenderTargetBitmap the MSDN page has example usage.
The article How to: Create a Bitmap from a Visual is linked near the bottom of the page.
Quintin Robinson
2009-09-23 21:33:41
Thanks!this is what I was looking for
tom greene
2009-09-23 21:43:06
Glad it was what you wanted
Quintin Robinson
2009-09-23 21:45:25
A:
I had the same problem but found the MSDN explaination difficult to follow. I eventually found RenderTargetBitmap - Visual vector to bitmap gave me enough understanding to make my program work.