开发者

Selecting path to a folder in my computer (as in OpenFileDialog but without filename) in Silverlight 4

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.


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜