如何检索隔离的文件夹结构 [英] How to Retrieve IsoLated File Folder Structure

查看:51
本文介绍了如何检索隔离的文件夹结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在开发一个应用程序,在该应用程序中,我想浏览存储在隔离存储文件夹中的所有文件.这样一来,只要点击该文件中的任何一个,我们都可以将该文件中的包含内容打开到文本框中.

I am developing an application , In that application i want to Browse all the files stored in the isolated Storage folder. So that Clicking any one of that file we can Open Contain of that file into a Text Box. 

请帮助

预先感谢...

推荐答案

基本思想如下.我认为您可以轻松实现其他事情:)

The basic idea like in below snippet. I think you can implement other things easily :)

IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();

IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();

foreach(isf.GetDirectoryNames()中的字符串文件夹)

foreach (string folder in isf.GetDirectoryNames())

{ LocalFilesList.Add(新的FileListViewModel { ImageSource ="/Images/Folder.png", FileID =文件夹", FileName =文件夹 }); } foreach(isf.GetFileNames()中的字符串文件) { LocalFilesList.Add(新的FileListViewModel { ImageSource ="/Images/File.png", FileID =文件", FileName =文件 }); } LocalFileListBox.ItemsSource = LocalFilesList;

{ LocalFilesList.Add(new FileListViewModel { ImageSource = "/Images/Folder.png", FileID = "folder", FileName = folder }); } foreach (string file in isf.GetFileNames()) { LocalFilesList.Add(new FileListViewModel { ImageSource = "/Images/File.png", FileID = "file", FileName = file }); } LocalFileListBox.ItemsSource = LocalFilesList;


这篇关于如何检索隔离的文件夹结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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