Save File Dialog
Pass the SaveFileDialogContext to the SaveFile method of the IPresentationService.
var context = new SaveFileDialogContext()
{
Title = "Please select an image",
DefaultExtension = "*.png",
DefaultFileName = "default.png"
};
context.Filters.Add(new FileDialogFilter("Image", "png", "jpg"));
context.Filters.Add(new FileDialogFilter("All files", "*"));
if (_presentationService.SaveFile(context) == DialogResult.Ok)
{
var file = context.FileName;
...
}
The path to the selected file is obtained from the context’s FileName property.
See the API document below for details.
« Open File Dialog | Menu | Animation of navigation » |