Share image in windows phone

邮差的信 提交于 2020-01-06 19:38:28

问题


I am using v7.1 sdk for developing windows phone 8 application ( as my system doesn't support windows 8 so i cant use window phone 8 sdk). I want to share image . In windows phone 8 sdk it is possible using SHAREMEDIATASK but in windows phone sdk v7.1 it is not possible . Now the only solution is to save that image in library and open programmatically, i am doing it like this :

MediaLibrary library = new MediaLibrary(); 
WriteableBitmap wbmp = new WriteableBitmap(canvas1, null);
MemoryStream ms = new MemoryStream();
System.Windows.Media.Imaging.Extensions.SaveJpeg(wbmp, ms, wbmp.PixelWidth, wbmp.PixelHeight, 0, 100);
ms.Seek(0, SeekOrigin.Begin);
library.SavePicture(string.Format("Images\\{0}.jpg", 0), ms);

At this point image has been saved , now how to open it progarmmatically ?

来源:https://stackoverflow.com/questions/22563037/share-image-in-windows-phone

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