Class SharpFileOpenDialog
A file open dialog.
Inherited Members
Namespace: SharpDialogs
Assembly: SharpDialogs.dll
Syntax
public static class SharpFileOpenDialog
Methods
| Edit this page View SourceShowMultiSelect(nint, string?, string?, string?, IReadOnlyCollection<SharpDialogFilter>?, int)
Shows a dialog to select multiple open filenames.
Declaration
public static IReadOnlyList<string>? ShowMultiSelect(nint hwndOwner, string? title = null, string? initialDirectory = null, string? defaultFileName = null, IReadOnlyCollection<SharpDialogFilter>? filters = null, int selectedFilterIndex = -1)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | hwndOwner | The handle of the onwer window. |
| string | title | The title of the dialog. |
| string | initialDirectory | The initial directory. |
| string | defaultFileName | The default filename. |
| IReadOnlyCollection<SharpDialogFilter> | filters | The files filter. |
| int | selectedFilterIndex | The index of the selected filter. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> | Returns selected open filenames. |
ShowMultiSelect(nint, string?, string?, string?, string, int)
Shows a dialog to select multiple open filenames.
Declaration
public static IReadOnlyList<string>? ShowMultiSelect(nint hwndOwner, string? title, string? initialDirectory, string? defaultFileName, string windowsFilter, int selectedFilterIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | hwndOwner | The handle of the onwer window. |
| string | title | The title of the dialog. |
| string | initialDirectory | The initial directory. |
| string | defaultFileName | The default filename. |
| string | windowsFilter | The files filter. |
| int | selectedFilterIndex | The index of the selected filter. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> | Returns selected open filenames. |
ShowSingleSelect(nint, string?, string?, string?, IReadOnlyCollection<SharpDialogFilter>?, int)
Shows a dialog to select a single open filename.
Declaration
public static string? ShowSingleSelect(nint hwndOwner, string? title = null, string? initialDirectory = null, string? defaultFileName = null, IReadOnlyCollection<SharpDialogFilter>? filters = null, int selectedFilterIndex = -1)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | hwndOwner | The handle of the onwer window. |
| string | title | The title of the dialog. |
| string | initialDirectory | The initial directory. |
| string | defaultFileName | The default filename. |
| IReadOnlyCollection<SharpDialogFilter> | filters | The files filters. |
| int | selectedFilterIndex | The index of the selected filter. |
Returns
| Type | Description |
|---|---|
| string | Returns the selected open filename. |
ShowSingleSelect(nint, string?, string?, string?, string, int)
Shows a dialog to select a single open filename.
Declaration
public static string? ShowSingleSelect(nint hwndOwner, string? title, string? initialDirectory, string? defaultFileName, string windowsFilter, int selectedFilterIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | hwndOwner | The handle of the onwer window. |
| string | title | The title of the dialog. |
| string | initialDirectory | The initial directory. |
| string | defaultFileName | The default filename. |
| string | windowsFilter | The files filter. |
| int | selectedFilterIndex | The index of the selected filter. |
Returns
| Type | Description |
|---|---|
| string | Returns the selected open filename. |