How save canvas as image?

寵の児 提交于 2019-12-04 05:26:13

问题



In my Silverlight application I have Canvas control in ScrollViewer and lot of controls in Canvas.
If canvas is too long I can use scrollviewer to see all content.
But I also wont to show for client in which part of canvas is he now like in photoshop.
I wont to do that be saveing canvas as image and than shoing image on left top corner with red rectangle on veweing part.
Is it possible to save canvas as image? If yes how to do that and if now is there any other solutions?
Thanks.


回答1:


try this

var img = new WriteableBitmap(myCanvas, null);


来源:https://stackoverflow.com/questions/4086550/how-save-canvas-as-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!