### Getting Started Guide Source: https://github.com/avaloniautils/dialoghost.avalonia/blob/main/_autodocs/MANIFEST.txt A guide for new users to set up and begin using the DialogHost. ```APIDOC ## getting-started.md ### Description Quick start guide for new users, covering setup, basic patterns, and initial usage. ### Steps 1. Overview (README.md) 2. Setup and Patterns (this document) 3. XAML Details (xaml-reference.md) 4. Troubleshooting (INDEX.md) ``` -------------------------------- ### Minimal DialogHost Setup Source: https://github.com/avaloniautils/dialoghost.avalonia/blob/main/_autodocs/xaml-reference.md Shows a basic DialogHost setup with simple TextBlock elements for both dialog content and main content. ```xml ``` -------------------------------- ### Dialog with Custom Theme Example Source: https://github.com/avaloniautils/dialoghost.avalonia/blob/main/_autodocs/styling-reference.md Example of a DialogHost using custom background and overlay brushes, with a thin accent border and rounded corners. Requires defining `CustomOverlayBrush`, `CustomBackgroundBrush`, and `AccentBrush` resources. ```xml ``` -------------------------------- ### Minimalist Dialog Example Source: https://github.com/avaloniautils/dialoghost.avalonia/blob/main/_autodocs/styling-reference.md Example of a minimalist DialogHost with a semi-transparent overlay and no box shadow. Close on click away is enabled. ```xml ``` -------------------------------- ### Initialize ViewModel on Dialog Open Source: https://github.com/avaloniautils/dialoghost.avalonia/blob/main/_autodocs/event-args-handlers.md Example of initializing a ViewModel when a dialog is opened. ```csharp await DialogHost.Show(content, openedEventHandler: (s, args) => { if (args.Session.Content is MyViewModel vm) { vm.Initialize(); } } ); ``` -------------------------------- ### Modern Card-Style Dialog Example Source: https://github.com/avaloniautils/dialoghost.avalonia/blob/main/_autodocs/styling-reference.md Example of a DialogHost styled as a modern card with rounded corners, no border, and a subtle shadow. Close on click away is enabled. ```xml ``` -------------------------------- ### Install DialogHost.Avalonia NuGet Package Source: https://github.com/avaloniautils/dialoghost.avalonia/blob/main/README.md Use this command to add the DialogHost.Avalonia package to your project. ```shell dotnet add package DialogHost.Avalonia ``` -------------------------------- ### Legacy Setup for DialogHostStyles Source: https://github.com/avaloniautils/dialoghost.avalonia/blob/main/_autodocs/styling-reference.md Shows the legacy method for setting up DialogHostStyles using StyleInclude, applicable for versions prior to 0.7. ```xml ``` -------------------------------- ### Simple Confirmation Dialog Example Source: https://github.com/avaloniautils/dialoghost.avalonia/blob/main/_autodocs/getting-started.md Demonstrates creating a reusable confirmation dialog with Yes/No buttons. The ViewModel initiates the dialog and handles the result. ```csharp public class ConfirmationViewModel { public async Task ShowConfirmation() { var dialog = new ConfirmationDialog(); var result = await DialogHost.Show(dialog, "MainDialogHost"); if (result is true) { // Proceed } } } public class ConfirmationDialog : UserControl { public ConfirmationDialog() { this.InitializeComponent(); } } ``` ```xml // XAML for ConfirmationDialog