Skip to content

IChoiceDialogService.Show<T> method

Shows a modal dialog with the given choices.

Namespace: Eremex.AvaloniaUI.Controls.ApplicationServices
Assembly: Eremex.Common.Contracts.dll
NuGet Package: Eremex.Common.Contracts

Declaration

public T Show<T>(string message, string? caption, IReadOnlyList<DialogChoice<T>> choices)

Type Parameters

name description
T The result type.

Parameters

name type description
message string The message text.
caption string? The window caption.
choices IReadOnlyList<DialogChoice<T>> The available choices. The order matches the button order.

Returns

type description
T The result of the pressed button, or default if the dialog was closed without a choice (by the caption button or Escape).

See Also

Used in articles