DialogService.ShowDialog<T> method (1 of 2)¶
See Also¶
- class DialogService
- namespace Eremex.AvaloniaUI.Controls.ApplicationServices
DialogService.ShowDialog<T> method (2 of 2)¶
Shows a modal dialog on top of the specified window. When no owner is given, the active application window is used.
public DialogResult ShowDialog<T>(T viewModel, string? caption, Window? owner)
where T : IDialogAwareViewModel
| parameter | description |
|---|---|
| T | The type of the view model that drives the dialog. |
| viewModel | The view model to display. It supplies the dialog content and buttons, and stays attached to the window until the dialog closes. |
| caption | The window caption. When null, the caption is taken from Title. |
| owner | The window the dialog is shown on top of. When null, the active application window is used. |
Return Value¶
The button the dialog was closed with, or None if the user dismissed it through the window caption button.
Exceptions¶
| exception | condition |
|---|---|
| ArgumentNullException | viewModel is null. |
See Also¶
- class DialogService
- namespace Eremex.AvaloniaUI.Controls.ApplicationServices