webKite
webKite

Reputation: 275

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.

Upvotes: 2

Views: 1415

Answers (1)

iCollect.it Ltd
iCollect.it Ltd

Reputation: 93601

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

Upvotes: 2

Related Questions