我有一个requireemnt,我必须将作为图像生成的WriteableBitmap上传到SharePoint文档库 . 谁能帮帮我吗 ?谢谢 .
下面是将WriteableBitmap转换为字节数组的扩展方法
public static byte[] ToByteArray(this WriteableBitmap bmp) { int[] p = bmp.Pixels; int len = p.Length * 4; byte[] result = new byte[len]; // ARGB Buffer.BlockCopy(p, 0, result, 0, len); return result; }
摘自此博客http://kodierer.blogspot.com/2009/11/convert-encode-and-decode-silverlight.html
要使用Client OM将其上载到文档库,您可以使用本教程http://www.zimmergren.net/archive/2010/06/10/sp-2010-uploading-files-using-the-client-om-in-sharepoint-2010.aspx
如果您使用的是SharePoint 2010,则可以使用Silverlight的客户端对象模型 . 它与.net的客户端对象模型非常相似,只是它是异步的 .
Here's an example
2 回答
下面是将WriteableBitmap转换为字节数组的扩展方法
摘自此博客http://kodierer.blogspot.com/2009/11/convert-encode-and-decode-silverlight.html
要使用Client OM将其上载到文档库,您可以使用本教程http://www.zimmergren.net/archive/2010/06/10/sp-2010-uploading-files-using-the-client-om-in-sharepoint-2010.aspx
如果您使用的是SharePoint 2010,则可以使用Silverlight的客户端对象模型 . 它与.net的客户端对象模型非常相似,只是它是异步的 .
Here's an example