如何以编程方式在 Windows Phone 8 中创建相册文件夹 [英] How to create a photo album folder in Windows Phone 8 Programmatically

查看:19
本文介绍了如何以编程方式在 Windows Phone 8 中创建相册文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到过很多关于这个话题的问题.所有的答案都说这是不可能的,所有的问题都只能这样回答.

I have seen many questions about this topic. All answers are saying it is not possible and all questions are answered like that only.

这里是一个 在 Windows Phone 中以编程方式创建相册8

但是在安装最新的 WhatsApp 更新后,它会在我的手机相册中创建一个文件夹.搜索互联网后,我得到了这个 URL:http://thegeekybeng.com/2013/12/18/whatsapp-for-windows-phone-get-a-much-needed-update/

But after installing the latest WhatsApp update it is creating a folder in my phone photo album. After searching the internet I got this URL: http://thegeekybeng.com/2013/12/18/whatsapp-for-windows-phone-get-a-much-needed-update/

……还有!现在可以更轻松地搜索您想要的视频和照片从 whatsapp 保存为一个名为Whatsapp"的新文件夹将是在相册中创建供您存储所有视频和照片从 Whatsapp 保存!...

.. What's more! Now it's easier to search for the videos and photos you Saved from whatsapp as a new folder simply named "Whatsapp" will be Created in the photo album for you to store all the videos and photos Saved from Whatsapp!...

这怎么可能?

推荐答案

这怎么可能."这只有在您有权访问 API 的/其他不公开的方式时才有可能,请查看 this 来自诺基亚的新闻报道,例如,它指出

"How is this possible." This is only possible if you have access to API's/other means that are not publicly available, look at this news report from Nokia for example, it states

开发人员正在与诺基亚合作开发一个版本针对最新的 Windows Phone 平台体验进行了适当优化.

The developers were working with Nokia to produce a version that is properly optimised for the latest Windows Phone platform experience.

这意味着 WhatsApp 开发人员可以访问一些我们不值得"的开发人员所没有的内部好东西.

This means that the WhatsApp developers had access to some of the internal goodies that we "unworthy" developers do not.

这是我能想到的唯一解释.那么,有可能吗?是的,但仅限于精英.

This is the only explanation I can think of. So, is it possible? Yes, but only for the elite.

在 WP8.1 中,您可以这样做:

In WP8.1 you could do this:

IReadOnlyList<StorageFolder> storageFolderList = await KnownFolders.PicturesLibrary.GetFoldersAsync();
if (storageFolderList.Where(x => x.Name == "FolderName").Count() == 0)
{
    StorageFolder folderCreationResult = await KnownFolders.PicturesLibrary.CreateFolderAsync("FolderName", CreationCollisionOption.ReplaceExisting);
    var messageDialog = new MessageDialog("FolderName has been created", "Folder Created");
    await messageDialog.ShowAsync();
}
else
{
    var messageDialog = new MessageDialog("FolderName already exists.", "Folder Exists");
    await messageDialog.ShowAsync(); 
}

这篇关于如何以编程方式在 Windows Phone 8 中创建相册文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆