IDialogService.ShowDialog<T> method¶
Shows the view model in a modal dialog and returns once the user closes it.
public DialogResult ShowDialog<T>(T viewModel, string? caption = null)
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 is attached to the window for as long as the dialog is open. |
| caption | The window caption. When null, the caption is taken from Title. |
Return Value¶
The button the dialog was closed with, or None if the user dismissed it through the window caption button.
See Also¶
- enum DialogResult
- interface IDialogAwareViewModel
- interface IDialogService
- namespace Eremex.AvaloniaUI.Controls.ApplicationServices