tom greene
tom greene

Reputation: 5449

How can I convert a WPF control into an image?

Is there an easy way to convert a WPF visual into an image? If so, what's the code?

Upvotes: 12

Views: 8793

Answers (1)

Quintin Robinson
Quintin Robinson

Reputation: 82335

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.

Upvotes: 12

Related Questions