The OpenFileService allows a developer to let the user choose a file from inside a view model.

Available for
WPF / Silverlight / WP7 / WP7 Mango

Test/Emulation service available: yes

Opening a file
To open a file, it is required to set the right properties of the service and then make a call to the DetermineFile method:

var openFileService = GetService<IOpenFileService>();
openFileService.Filter = "All files|*.*";
if (openFileService.DetermineFile())
{
    // User selected a file
}

Last edited Jul 10, 2011 at 12:49 PM by GeertvanHorrik, version 4

Comments

No comments yet.