SelectDirectoryService

The ISelectDirectoryService allows a developer to let the user choose a directory from inside a view model.

Platform info

FrameworkSupported
WPF
Silverlight 5
Windows Phone 8.0
Windows Phone 8.1
Windows RT 8.0
Windows RT 8.1
Android
iOS
Test/emulation service

Selecting a directory

To select a directory, it is required to set the right properties of the service and then make a call to the DetermineDirectory method:

var dependencyResolver = this.GetDependencyResolver();
var selectDirectoryService = dependencyResolver.Resolve<ISelectDirectoryService>();
if (selectDirectoryService.DetermineDirectory())
{
    // User selected a directory
}