开发者

Silverlight PrtScr some controls

开发者 https://www.devze.com 2023-01-28 02:24 出处:网络
I need to programmatically PrtScr my controls in silverlight.(Save to bitmap) How c开发者_Go百科an i do this?In WPF you can use the RenderTagetBitmap class to convert a Visual to an image, however thi

I need to programmatically PrtScr my controls in silverlight.(Save to bitmap) How c开发者_Go百科an i do this?


In WPF you can use the RenderTagetBitmap class to convert a Visual to an image, however this is not present in Sivlerlight. The following article details a rather long winded approach you can use to (sort of) save visuals in Silverlight. It's not a great solution though.

http://thedatafarm.com/blog/tablet/converting-silverlight-inkpresenter-images-to-a-png-file/


It also looks as though you can use this method in WriteableBitmap, although I have never tried it.

http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap.render(v=VS.95).aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消