Skip to content

WindowService.Show<T> method (1 of 2)

Namespace: Eremex.AvaloniaUI.Controls.ApplicationServices
Assembly: Eremex.Avalonia.Controls.ApplicationServices.dll
NuGet Package: Eremex.Avalonia.Controls.ApplicationServices

Declaration

public void Show<T>(T viewModel, string? caption = null)
    where T : IWindowAwareViewModel

See Also


WindowService.Show<T> method (2 of 2)

Shows a non-modal window. When no owner is given, the active application window is used.

Namespace: Eremex.AvaloniaUI.Controls.ApplicationServices
Assembly: Eremex.Avalonia.Controls.ApplicationServices.dll
NuGet Package: Eremex.Avalonia.Controls.ApplicationServices

Declaration

public void Show<T>(T viewModel, string? caption, Window? owner)
    where T : IWindowAwareViewModel

Type Parameters

name description
T The type of the view model that drives the window.

Parameters

name type description
viewModel T The view model to display. It stays attached to the window until the window closes.
caption string? The window caption. When null, the caption is taken from Title.
owner Window? The window that owns the new window. When null, the active application window is used; if there is none, the window is shown without an owner.

Exceptions

exception condition
ArgumentNullException viewModel is null.

See Also

Used in articles