Choosing folders from list that I supply
I have a WPF application which maintains a set of virtual 'folders' (organizational concept), and I'd like to hook into something like the Folder Browse Dialog to select a folder (as a parent to some other kind of operation).
These are NOT denizens of the filesystem - what I need to do is be able to programmatically tell the dialog that at parent folder F, folders C1, C2, and C3 exist. I'd like the user to be able to browse and then select a folder - and then ge开发者_开发知识库t the final selection information returned to me (what was the parent, which child was selected).
In other words, I want something that LOOKS like the Browse Folder Dialog - but I fill it with my own pretend set of folders and subfolders; and at the end I can get out the folder they actually chose.
Any way to do this in WPF?
Maybe you could restrict the folder opened AND populate with fake folders. Sounds unlikely to me though.
It will probably turn out more productive to create your own control with a treeview and your fake folders. And pop that up.
If you copy the layout of a file open dialog box as close as possible, most user will believe it is one and the usability will be decent.
精彩评论