OutWit.Common.MVVM.Navigation.Avalonia.DialogHost 1.0.0

dotnet add package OutWit.Common.MVVM.Navigation.Avalonia.DialogHost --version 1.0.0
                    
NuGet\Install-Package OutWit.Common.MVVM.Navigation.Avalonia.DialogHost -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OutWit.Common.MVVM.Navigation.Avalonia.DialogHost" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OutWit.Common.MVVM.Navigation.Avalonia.DialogHost" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="OutWit.Common.MVVM.Navigation.Avalonia.DialogHost" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OutWit.Common.MVVM.Navigation.Avalonia.DialogHost --version 1.0.0
                    
#r "nuget: OutWit.Common.MVVM.Navigation.Avalonia.DialogHost, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OutWit.Common.MVVM.Navigation.Avalonia.DialogHost@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OutWit.Common.MVVM.Navigation.Avalonia.DialogHost&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=OutWit.Common.MVVM.Navigation.Avalonia.DialogHost&version=1.0.0
                    
Install as a Cake Tool

OutWit.Common.MVVM.Navigation.Avalonia.DialogHost

Shows OutWit.Common.MVVM.Navigation dialogs through DialogHost.Avalonia, for an application already themed with Material.Avalonia that wants its dialogs to match the rest of it.

It is a separate package on purpose: the navigation packages ship two hosts of their own — a modal window and an overlay layer — and neither costs an external dependency. Take this one only if you already have DialogHost.Avalonia in the application.

Setup

services.AddNavigation(nav => ...);
services.AddAvaloniaNavigation(o => o.UseDialogHost<DialogHostAvaloniaAdapter>());

<dialogHost:DialogHost Identifier="Root" CloseOnClickAway="True">
  
</dialogHost:DialogHost>

The Identifier matches the host name a dialog is shown on — Root is the default, and DialogHosts.ROOT is the constant for it. Nothing above changes: view models still implement IDialogAware<TResult> and never learn which host showed them.

What the adapter is for

DialogHost.Avalonia closes a dialog the moment the user clicks away, and the navigation contract says every close the user starts has to go through the dialog's own CanCloseAsync first — a screen with unsaved changes gets to say no. The adapter is the piece that tells the two kinds of close apart: it vetoes the user's, asks, and closes for real only if the dialog agrees. A close the dialog service asked for is not put to the vote.

Dialogs do not nest: DialogHost.Avalonia keeps one session per identifier, so SupportsNesting is false and a second ShowAsync on a busy host comes back cancelled with a warning in the log — the same behaviour as the built-in overlay host.

License

Apache-2.0. Part of the OutWit ecosystem.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 85 8/23/2026