开发者

Silverlight PrtScr some controls

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜