views:

444

answers:

4

Hi,

Does anybody knows how to have an open folder dialog in Silverlight? Any third party controls?

I know there is a OpenFileDialog but this is not what I'm looking for. I want a dialog for folders only.

Thanks.

+2  A: 

From MSDN.

Silverlight does not have a browse folder dialog box and you cannot use the OpenFileDialog to just select a folder.

Shoban
thanks shoban, I've read that also but is there a work around for this? are there any third party controls I could use?
daxsorbito
Like mcxiand said. Create your own user control :)
Shoban
ya maybe that's the only way out of this. :)
daxsorbito
+2  A: 

just create your own user control for this as this is not supported currently by silverlight.

mcxiand
thanks. maybe this is the only way out. unless someone could give me some light. :)
daxsorbito
You won't be able to create your own, because Silverlight (intentionally) does not give the developer access to a user's hard-drive (to do so would be a major security issue).
KeithMahoney
I see thanks for the info. Do you have any idea on this? Why does silverlight have a file open dialog and don't have a folder open dialog if security issue is concern? hmm.. I'll dig some more...
daxsorbito
+1  A: 

A folder browser dialog would serve no purpose.

SL3 it is by deliberate design that the SL can only access a file (not a folder) and only if that file it is specifically selected by the user in the OpenFileDialog. Its not even possible to determine the folder in which the file is found.

AnthonyWJones
A: 

I am stuck in a similar situation. Any workarounds for this? Thanks!