SaveFileService
The ISaveFileService allows a developer to let the user choose a file from inside a view model.
Framework | Supported |
---|---|
WPF | |
Silverlight 4 | |
Silverlight 5 | |
Windows Phone 7 | |
Windows Phone 8 | |
Windows RT | |
Test/emulation service |
Choosing a file
To select a file to save, it is required to set the right properties of the service and then make a call to the DetermineFile method:
var saveFileService = GetService<ISaveFileService>(); saveFileService.Filter = "C# File|*.cs"; if (saveFileService.DetermineFile()) { // User selected a file }