首页 > 代码库 > wp8 入门到精通 启动系统分享照片任务

wp8 入门到精通 启动系统分享照片任务

PhotoChooserTask photoChooserTask = new PhotoChooserTask();

photoChooserTask.Completed += photoChooserTask_Completed;
photoChooserTask.ShowCamera = true;
photoChooserTask.Show();

void photoChooserTask_Completed(object sender, PhotoResult e)
{
if (e.TaskResult == TaskResult.OK)
{
ShowShareMediaTask(e.OriginalFileName);
}
}
void ShowShareMediaTask(string path)
{
ShareMediaTask shareMediaTask = new ShareMediaTask();
shareMediaTask.FilePath = path;
shareMediaTask.Show();
}

二。从系统相册里启动分享

http://msdn.microsoft.com/zh-cn/library/windows/apps/ff967563(v=vs.105).aspx