IDialogService.ShowDialog<T> method
Shows the view model in a modal dialog and returns once the user closes it.
Namespace: Eremex.AvaloniaUI.Controls.ApplicationServices
Assembly: Eremex.Common.Contracts.dll
NuGet Package: Eremex.Common.Contracts
Declaration
public DialogResult ShowDialog<T>(T viewModel, string? caption = null)
where T : IDialogAwareViewModel
Type Parameters
| name |
description |
| T |
The type of the view model that drives the dialog. |
Parameters
| name |
type |
description |
| viewModel |
T |
The view model to display. It supplies the dialog content and buttons, and is attached to the window for as long as the dialog is open. |
| caption |
string? |
The window caption. When null, the caption is taken from Title. |
Returns
| type |
description |
DialogResult |
The button the dialog was closed with, or None if the user dismissed it through the window caption button. |
See Also