Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi, I am developing a paint like application in metro style with XAML/C# . I want to save whatever content is drawn on canvas as image. I have checked this solutions but it didn't helped me.

Save canvas to bitmap[^]

WPF/XAML: Saving a Window or Canvas as a PNG Bitmap[^]

So how can I save the canvas content as image in win 8 metro app? Please help me with sample coding.
Posted
Updated 28-Jun-12 2:48am
v2

Thanks Jαved, but I want the solution for XAML/C# canvas element not for HTML5/JS canvas.
 
Share this answer
 
Hi,
You can use the msToBlob property of the canvas:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465734.aspx[^]
http://msdn.microsoft.com/en-us/library/windows/apps/hh465735.aspx[^]

Than you can convert that blog to a stream and save it.
Link[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900