tags:

views:

42

answers:

2

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
Thanks!this is what I was looking for
tom greene
Glad it was what you wanted
Quintin Robinson
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.