ShellExtensibility.ShowOpenFileDialogAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Shows the file dialog to open a file.
public System.Threading.Tasks.Task<string?> ShowOpenFileDialogAsync (Microsoft.VisualStudio.Extensibility.Shell.FileDialog.FileDialogOptions options, System.Threading.CancellationToken cancellationToken);
member this.ShowOpenFileDialogAsync : Microsoft.VisualStudio.Extensibility.Shell.FileDialog.FileDialogOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function ShowOpenFileDialogAsync (options As FileDialogOptions, cancellationToken As CancellationToken) As Task(Of String)
Parameters
- options
- FileDialogOptions
The file dialog options.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
The string representing the file path of the selected file. This is null if the user cancelled the dialog or there was an error.