获取OneDrive中图像的URL

本文关键字:URL 图像 OneDrive 获取 | 更新日期: 2023-09-27 18:08:43

我在c#中使用LiveSDK。是否有任何方法可以获得指定图像文件的URL(例如,URL: https://onedrive.live.com/embed?cid=1ED5694B634A1579&resid=1ED5694B634A1579%21685&authkey=ANQwPScWiCxbILY),以便将此链接直接放置到image (Source属性)控件?我不想从OneDrive文件下载流,将其设置为BitmapImage并将其放在Image控件中。

我知道OneDrive web应用程序允许为选定的文件创建URL,但不知道SDK是否有这样的功能

获取OneDrive中图像的URL

MSDN示例页面中有一个非常好的示例,展示了如何从OneDrive中提取和使用图像。

Photo Sky SampleThis sample demonstrates how to use the LiveSDK for pulling images from SkyDrive. In this sample you will learn how to use LiveSDK and request consent from the user to access his SkyDrive files and display the images in a Metro style application.

来源:PhotoSky - SkyDrive样本