在 Silverlight 4 中选择我的计算机中的文件夹路径(如 OpenFileDialog 中但没有文件名)

发布于 2024-09-25 23:07:25 字数 177 浏览 0 评论 0原文

我在 silverlight 中见过 OpenFileDialog 和 SaveFileDialog,但是,如果我需要选择计算机中的文件夹路径怎么办?

设想: 用户想要选择计算机中可用于其文件的路径。例如,有一个按钮(例如,选择保存工作的路径按钮),他将使用该按钮来浏览文件夹。当他完成选择后,路径应该返回到文本框或类似的。

I have seen OpenFileDialog and SaveFileDialog in silverlight but, what if I required to select path of folder in my computer?

Scenario:
The user want to select path in the Computer which he can use for his files. For example there is a button (e.g. Select path to save your work button) which he will use to browse folder. When he is done with selection the path should return to the textbox or similar.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岛歌少女 2024-10-02 23:07:25

Silverlight 也不会让您了解有关选定文件的任何信息(只需将其作为文件流访问)。

让您知道文件的路径将被视为另一个安全漏洞,因此这是不允许的。对不起。

您可以使用的唯一文件夹位于独立存储中,因此您可能希望将所有用户文件放在那里。这样您可以提供文件和文件夹的树形显示(当然,您必须获取或编写该文件/文件夹选择代码)。

Silverlight does not let you know anything about a selected file either (just access it as a file stream).

Letting you know the file's path would be considered another security hole, so it is not allowed. Sorry.

The only folders you can use are in Isolated storage, so you may want to put all your user files there instead. That way you can provide a tree display of files and folders (you will have to obtain, or write, that file/folder selection code of course).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文