Class FileDialogs
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Modern Windows file dialogs (IFileOpenDialog / IFileSaveDialog), owned by the host window. Modal: they run a nested message loop, call them from the UI thread.
public static class FileDialogs
- Inheritance
-
FileDialogs
- Inherited Members
Methods
OpenFile(UIHost?, string, IReadOnlyList<FileFilter>?, string?)
Asks for one file to open. Returns null if cancelled.
public static string? OpenFile(UIHost? owner, string title, IReadOnlyList<FileFilter>? filters = null, string? initialFolder = null)
Parameters
ownerUIHosttitlestringfiltersIReadOnlyList<FileFilter>initialFolderstring
Returns
OpenFiles(UIHost?, string, IReadOnlyList<FileFilter>?, string?)
Asks for one or more files to open. Returns an empty list if cancelled.
public static IReadOnlyList<string> OpenFiles(UIHost? owner, string title, IReadOnlyList<FileFilter>? filters = null, string? initialFolder = null)
Parameters
ownerUIHosttitlestringfiltersIReadOnlyList<FileFilter>initialFolderstring
Returns
PickFolder(UIHost?, string, string?)
Asks for a folder. Returns null if cancelled.
public static string? PickFolder(UIHost? owner, string title, string? initialFolder = null)
Parameters
Returns
SaveFile(UIHost?, string, IReadOnlyList<FileFilter>?, string?, string?, string?)
Asks for a destination file. Returns null if cancelled.
public static string? SaveFile(UIHost? owner, string title, IReadOnlyList<FileFilter>? filters = null, string? defaultFileName = null, string? defaultExtension = null, string? initialFolder = null)
Parameters
ownerUIHosttitlestringfiltersIReadOnlyList<FileFilter>defaultFileNamestringdefaultExtensionstringinitialFolderstring