在win8 App中,StorageFile比Path更好用

Skip the path: stick to the StorageFile:

http://blogs.msdn.com/b/wsdevsol/archive/2012/12/05/stray-from-the-path-stick-to-the-storagefile.aspx

Converting a StorageFile to a path to remember it for later is often workable, but you will need to have a fallback identifier for path-less StorageItems. The Windows.Storage.AccessCache namespace provides classes to remember StorageItems so they can be reloaded later without requiring the user to go through the picker. The StorageApplicationPermissions.FutureAccessList provides random access to items that have been previously used. The MostRecentlyUsedList allows keeping a list of recently used locations. See How to track recently used files and folders and the File picker sample and the File access sample).

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。