# FileDialogServiceExtensions.ShowAsync method (1 of 2)

Shows an open file dialog over the given Avalonia top level without blocking.

**Namespace:** [`Eremex.AvaloniaUI.Controls.ApplicationServices`](https://eremexcontrols.net/API/Eremex.AvaloniaUI.Controls.ApplicationServices/index.md)  
**Assembly:** `Eremex.Avalonia.Controls.ApplicationServices.dll`  
**NuGet Package:** [Eremex.Avalonia.Controls.ApplicationServices](https://www.nuget.org/packages/Eremex.Avalonia.Controls.ApplicationServices)

## Declaration

```csharp
public static Task<string[]> ShowAsync(this IOpenFileDialogService service, TopLevel? owner, 
    OpenFileDialogOptions? options = null)
```

## Parameters

| name | type | description |
| --- | --- | --- |
| service | `IOpenFileDialogService` | The open file dialog service. |
| owner | `TopLevel?` | The window (top level) to show the dialog over; `null` for the active window. |
| options | `OpenFileDialogOptions?` | The dialog options. |

## Returns

| type | description |
| --- | --- |
| `Task<string[]>` | The selected files, or an empty array when the dialog was cancelled. |

## See Also

* class [FileDialogServiceExtensions](https://eremexcontrols.net/API/Eremex.AvaloniaUI.Controls.ApplicationServices/FileDialogServiceExtensions/index.md)
* namespace [Eremex.AvaloniaUI.Controls.ApplicationServices](https://eremexcontrols.net/API/Eremex.AvaloniaUI.Controls.ApplicationServices/index.md)

---

# FileDialogServiceExtensions.ShowAsync method (2 of 2)

Shows a save file dialog over the given Avalonia top level without blocking.

**Namespace:** [`Eremex.AvaloniaUI.Controls.ApplicationServices`](https://eremexcontrols.net/API/Eremex.AvaloniaUI.Controls.ApplicationServices/index.md)  
**Assembly:** `Eremex.Avalonia.Controls.ApplicationServices.dll`  
**NuGet Package:** [Eremex.Avalonia.Controls.ApplicationServices](https://www.nuget.org/packages/Eremex.Avalonia.Controls.ApplicationServices)

## Declaration

```csharp
public static Task<string?> ShowAsync(this ISaveFileDialogService service, TopLevel? owner, 
    SaveFileDialogOptions? options = null)
```

## Parameters

| name | type | description |
| --- | --- | --- |
| service | `ISaveFileDialogService` | The save file dialog service. |
| owner | `TopLevel?` | The window (top level) to show the dialog over; `null` for the active window. |
| options | `SaveFileDialogOptions?` | The dialog options. |

## Returns

| type | description |
| --- | --- |
| `Task<string?>` | The chosen file, or `null` when the dialog was cancelled. |

## See Also

* class [FileDialogServiceExtensions](https://eremexcontrols.net/API/Eremex.AvaloniaUI.Controls.ApplicationServices/FileDialogServiceExtensions/index.md)
* namespace [Eremex.AvaloniaUI.Controls.ApplicationServices](https://eremexcontrols.net/API/Eremex.AvaloniaUI.Controls.ApplicationServices/index.md)

<!-- DO NOT EDIT: generated by xmldocmd for Eremex.Avalonia.Controls.ApplicationServices.dll -->
