AnsweredAssumed Answered

How to set the initialPath attribute to feed the SelectFolder method of the BrowseForFolder class?

Question asked by TomGeo on Nov 12, 2018
Latest reply on Nov 12, 2018 by TomGeo

I need to provide my clients with the possibility to select a GDB from within a DockPaneView.

Now that I found out on how to get the parentWindow to satisfy the SelectFolder method I have to realize I cannot set the initialPath attribute. The method expects a string but writing "c:\\" still opens the dialog in the users home directory.

 

I found that I should be able to set the path to a sub-directory of the users home directory by writing e.g. "~/Documents".

 

Nothing off this works. I always start in the users home directory. But what I want is the possibility for the user to store the selected path in my solution as a resource variable and next time the SelectFolder dialog is opened the resource variable should retrieve the initial path from the resource file.

 

Has somebody a working example on how to set the initialPath attribute?

As said, the functionality is required to work from within a DockPaneView (WPF).

 

Best Thomas

Outcomes