問題描述
Silverlight PrtScr 一些控件 (Silverlight PrtScr some controls)
我需要在 silverlight 中以編程方式 PrtScr 我的控件。(保存到位圖)我該怎麼做?
參考解法
方法 1:
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/
方法 2:
It also looks as though you can use this method in WriteableBitmap, although I have never tried it.