{"id":13779166,"url":"https://github.com/jamsoft/JamSoft.AvaloniaUI.Dialogs","last_synced_at":"2025-05-11T12:32:54.026Z","repository":{"id":65934102,"uuid":"602802953","full_name":"jamsoft/JamSoft.AvaloniaUI.Dialogs","owner":"jamsoft","description":"Provides the ability to show various dialogs and child windows in a DI injectable application dialog service ready to plug into MVVM AvaloniaUI applications.  The general idea is to make it as simple as possible to handle all the basics of using dialogs with as few assumptions as possible whilst also providing a feature rich experience.","archived":false,"fork":false,"pushed_at":"2024-04-26T13:09:59.000Z","size":398,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-23T00:27:11.982Z","etag":null,"topics":["avaloniaui","c-sharp","csharp","dialog","dotnet","mvvm","mvvm-architecture","mvvm-pattern","services","window-manager","windows","wizard","wizard-steps","wizards"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-17T01:04:52.000Z","updated_at":"2024-05-23T00:27:11.983Z","dependencies_parsed_at":null,"dependency_job_id":"7e3b68b8-f7a5-4fe3-bbc6-0ca4a177f46f","html_url":"https://github.com/jamsoft/JamSoft.AvaloniaUI.Dialogs","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":"0.038461538461538436","last_synced_commit":"1567fe23bd211fb8619214a257ff976a95b1135c"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamsoft%2FJamSoft.AvaloniaUI.Dialogs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamsoft%2FJamSoft.AvaloniaUI.Dialogs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamsoft%2FJamSoft.AvaloniaUI.Dialogs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamsoft%2FJamSoft.AvaloniaUI.Dialogs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamsoft","download_url":"https://codeload.github.com/jamsoft/JamSoft.AvaloniaUI.Dialogs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225008583,"owners_count":17406300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avaloniaui","c-sharp","csharp","dialog","dotnet","mvvm","mvvm-architecture","mvvm-pattern","services","window-manager","windows","wizard","wizard-steps","wizards"],"created_at":"2024-08-03T18:01:01.957Z","updated_at":"2024-11-17T14:31:13.694Z","avatar_url":"https://github.com/jamsoft.png","language":"C#","funding_links":[],"categories":["Libraries \u0026 Extensions"],"sub_categories":["Controls"],"readme":"# Introduction\n\nProvides the ability to show various dialogs, child windows, message boxes and Wizards in a DI injectable service ready to plug into MVVM AvaloniaUI applications.\n\nThe general idea is to make it as simple as possible to handle all the basics of using dialogs with as few assumptions as possible whilst also providing a feature rich experience.\n\nMore or less everything is replaceable, extendable \u0026 customisable.\n\n## GitHub Pages Site\n\n![Nuget](https://img.shields.io/nuget/v/JamSoft.AvaloniaUI.Dialogs)\n![GitHub](https://img.shields.io/github/license/jamsoft/JamSoft.AvaloniaUI.Dialogs)\n[![CodeFactor](https://www.codefactor.io/repository/github/jamsoft/jamsoft.avaloniaui.dialogs/badge)](https://www.codefactor.io/repository/github/jamsoft/jamsoft.avaloniaui.dialogs)\n\nhttps://jamsoft.github.io/JamSoft.AvaloniaUI.Dialogs/\n\n## Installation\n```shell\ndotnet add package JamSoft.AvaloniaUI.Dialogs --version 1.4.0\n```\n```shell\nInstall-Package JamSoft.AvaloniaUI.Dialogs -Version 1.4.0\n```\n```xml\n\u003cPackageReference Include=\"JamSoft.AvaloniaUI.Dialogs\" Version=\"1.4.0\" /\u003e\n```\n```shell\npaket add JamSoft.AvaloniaUI.Dialogs --version 1.4.0\n```\n### Tested On\n- Windows 10 \u0026 11 \n- MacOS Sonoma 14.5\n- Pop!_OS 22.04\n\n## Sample Application\nThe sample application demonstrates how to use the library in a real-world scenario. It shows how to use the dialog service to open files, save files, show message boxes, show dialogs and child windows. It also demonstrates how to use the wizard control along with saving and restoring window sizes and positions.\n![sample-app](https://github.com/jamsoft/JamSoft.AvaloniaUI.Dialogs/blob/master/src/img/sample-app.png?raw=true)\n\n## Import Styles\n### All Defaults\n```xml\n\u003cApplication.Styles\u003e\n    \u003cFluentTheme /\u003e\n    \u003cStyleInclude Source=\"avares://JamSoft.AvaloniaUI.Dialogs/Themes/Default.axaml\"/\u003e\n\u003c/Application.Styles\u003e\n```\n### Individual Style Files\n```xml\n\u003cApplication.Styles\u003e\n    \u003cFluentTheme /\u003e\n    \u003cStyleInclude Source=\"avares://JamSoft.AvaloniaUI.Dialogs/Themes/MsgBoxStyles.axaml\"/\u003e\n    \u003cStyleInclude Source=\"avares://JamSoft.AvaloniaUI.Dialogs/Themes/ChildStyle.axaml\"/\u003e\n    \u003cStyleInclude Source=\"avares://JamSoft.AvaloniaUI.Dialogs/Themes/ModalStyle.axaml\"/\u003e\n    \u003cStyleInclude Source=\"avares://JamSoft.AvaloniaUI.Dialogs/Themes/WizardStyle.axaml\"/\u003e\n    \u003cStyleInclude Source=\"avares://JamSoft.AvaloniaUI.Dialogs/Themes/WizardStepStyle.axaml\"/\u003e\n\u003c/Application.Styles\u003e\n```\n\n### Custom Window Styling\nSince we are using plain old `Window` objects, basic styling properties like `Background` colors will be inherited from your own applications default `Window` style, such as:\n```xml\n\u003cStyle Selector=\"Window\"\u003e\n    \u003cSetter Property=\"Background\" Value=\"#333333\" /\u003e\n\u003c/Style\u003e\n```\nThe same is true for your default button styles and basic text and font settings so theming things should be little more than plugging in the library and starting to use it.\n## Creating Service Instances\n#### Dialog Service\n```csharp\nIDialogService dialogService = DialogServiceFactory.Create(new DialogServiceConfiguration({\n    ApplicationName = \"Dialog Sample App\", \n    UseApplicationNameInTitle = true,\n    ViewsAssemblyName = Assembly.GetExecutingAssembly().GetName().Name\n});\n```\n#### MessageBox Service\n```csharp\nIMessageBoxService msgboxService = DialogServiceFactory.CreateMessageBoxService();\n```\n## Registration Example Using Splat DI\n#### Registering the Services - Program.cs\n```csharp\npublic static void Main(string[] args)\n{\n    RegisterDependencies();\n    \n    BuildAvaloniaApp()\n        .StartWithClassicDesktopLifetime(args);\n}\n\nprivate static void RegisterDependencies() =\u003e\n    BootStrapper.Register(Locator.CurrentMutable, Locator.Current);\n        \n```\n#### Registering the Services - Bootstrapper.cs\n```csharp\npublic class BootStrapper\n{\n    public static void Register(IMutableDependencyResolver services, IReadonlyDependencyResolver resolver)\n    {\n        services.RegisterLazySingleton(() =\u003e DialogServiceFactory.Create(new DialogServiceConfiguration\n        {\n            ApplicationName = \"Dialog Sample App\", \n            UseApplicationNameInTitle = true,\n            ViewsAssemblyName = \"JamSoft.AvaloniaUI.Dialogs.Sample\"\n        }));\n        \n        services.RegisterLazySingleton(DialogServiceFactory.CreateMessageBoxService);\n        \n        services.Register(() =\u003e new MainWindowViewModel(resolver.GetService\u003cIDialogService\u003e()!, resolver.GetService\u003cIMessageBoxService\u003e()!));\n        services.Register(() =\u003e new MyDialogViewModel());\n        services.Register(() =\u003e new MyChildViewModel());\n    }\n}        \n```\n# Usage\n\n## Resolving Services\nNow that we have this setup and registered, we can make use of the service from view models like this. First, add it as a constructor parameter.\n```csharp\nprivate readonly IDialogService _dialogService;\nprivate readonly IMessageBoxService _messageBoxService;\n\npublic MainWindowViewModel(IDialogService dialogService, IMessageBoxService messageBoxService)\n{\n    _dialogService = dialogService;\n    _messageBoxService = messageBoxService;\n}\n...\n```\n\n# Usage - Message Boxes\n![basic-message-box](https://github.com/jamsoft/JamSoft.AvaloniaUI.Dialogs/blob/master/src/img/message-box.png?raw=true)\n\nThe message box implementation closely follows the .NET/Forms/WPF `MessageBox` class. It provides a simple way to show message boxes with various button configurations and icons.\n\n## Result Object\nThe `Show` method returns a `MsgBoxResult` object which contains the button result that was clicked by the user. This can be used to determine the action to take in your application.\n\nIf the checkbox is also used, by providing text for the `CheckBox` message in the `Show` call, the result can be checked in the returned `MsgBoxResult` object.\n\n```csharp\npublic sealed class MsgBoxResult\n{\n    public MsgBoxButtonResult ButtonResult { get; }\n    \n    public bool CheckBoxResult { get; }\n\n    private MsgBoxResult(bool checkBoxResult, MsgBoxButtonResult buttonResult)\n    {\n        CheckBoxResult = checkBoxResult;\n        ButtonResult = buttonResult;\n    }\n    \n    public static MsgBoxResult CreateResult(bool checkBoxChecked, MsgBoxButtonResult buttonResult) =\u003e new(checkBoxChecked, buttonResult);\n}\n```\n## Show Message Box\n```csharp\nvar msgbResult = await _messageBoxService.Show(\"OK Cancel\", \"Do you want to carry on?\", MsgBoxButton.OkCancel, MsgBoxImage.Question);\n```\nYou can also pass a view model instance to the `Show` method to customise the message box using the default provided `MsgBoxViewModel` class.\n```csharp\nvar viewModel = new MsgBoxViewModel(\"Yes No With Icon\", \"Do you want to carry on?\", MsgBoxButton.YesNo, MsgBoxImage.Warning);\nvar btnResult = await _messageBoxService.Show(viewModel);\n```\nYou can also use any custom view model class by implementing the `IMessageBoxViewModel` interface.\n```csharp\npublic class MyCustomMsgBoxViewModel : IMsgBoxViewModel\n{\n}\n\nvar myCustomMsgBoxViewModel = new MyCustomMsgBoxViewModel();\n...\nvar btnResult = await _messageBoxService.Show(myCustomMsgBoxViewModel);\n```\n### Custom Icons\n```csharp\nvar viewModel = new MsgBoxViewModel(\"Yes No With Icon\", \"Do you want to carry on?\", MsgBoxButton.YesNo, MsgBoxImage.Custom);\nviewModel.Icon = new Bitmap(\"myicon.png\");\nvar result = await _messageBoxService.Show(viewModel);\n```\n### Changing Icon Background Color\n```xml\n\u003cStyle Selector=\"Ellipse#MsgBoxIconBackgroundEllipse\"\u003e\n    \u003cSetter Property=\"Fill\" Value=\"Red\"/\u003e\n\u003c/Style\u003e\n```\n### Custom Button Text\n```csharp\nvar result = await _messageBoxService.Show(\"German Yes No Cancel\", \"Möchten Sie weitermachen?\", \n    MsgBoxButton.YesNoCancel, \n    MsgBoxImage.Question, \"Nein\", \"Ja\", \"Abbrechen\");\n```\n### Show Message Box With Checkbox\n![basic-message-box-with-checkbox](https://github.com/jamsoft/JamSoft.AvaloniaUI.Dialogs/blob/master/src/img/message-box-checkbox.png?raw=true)\n```csharp\nvar msgBoxResult = await _messageBoxService.Show(\"OK Cancel With Checkbox\", \"Do you want to carry on?\", MsgBoxButton.OkCancel, MsgBoxImage.Error, checkBoxText:\"Don't ask me again\");\nmsgBoxResult.ButtonResult;\nmsgBoxResult.CheckBoxResult;\n```\n# File Paths\n### Open Any File\n```csharp\nstring path = await _dialogService.OpenFile(\"Open Any File\");\n```\n### Open A Specific File Type\n```csharp\nstring path = await _dialogService.OpenFile(\"Open Word File\", new List\u003cFileDialogFilter\u003e\n{\n    new(\"Word Files\")\n    {\n        Patterns = new List\u003cstring\u003e { \"*.docx\", \"*.doc\" }, \n        AppleUniformTypeIdentifiers = new List\u003cstring\u003e { \"com.microsoft.word.doc\", \"org.openxmlformats.wordprocessingml.document\" }, \n        MimeTypes = new List\u003cstring\u003e { \"application/msword\", \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" }\n    }\n});\n```\nYou can also make use of the built in `CommonFilters` helper class.\n```csharp\nstring path = await _dialogService.OpenFile(\"Open Word File\", new List\u003cFileDialogFilter\u003e\n{\n    CommonFilters.WordFilter\n});\n```\n### Open Multiple Files\n```csharp\nstring[] paths = await _dialogService.OpenFiles(\"Open Multiple Files\");\n```\n### Save Any Path\n```csharp\nstring path = await _dialogService.SaveFile(\"Save Any File\");\n```\n### Save To Your Custom File Type\n```csharp\nstring path = await _dialogService.SaveFile(\"Save New MyApp Project\", new List\u003cFileDialogFilter\u003e\n{\n    new()\n    {\n        Name = \"MyApp Project\", \n        Patterns = new List\u003cstring\u003e { \"*.myappext\" },\n        AppleUniformTypeIdentifiers = new List\u003cstring\u003e { \"com.myorgname.myappext\" },\n    }\n});\n```\n# Usage - Dialogs\nThere are two base view model classes already baked in for ease of use of the library. These are provided as defaults and a starting point. Create a suitable view model and inherit from either `DialogViewModel` or `ChildWindowViewModel` as base class.\n\n## Show Dialog\n![basic-dialog](https://github.com/jamsoft/JamSoft.AvaloniaUI.Dialogs/blob/master/src/img/basic-dialog.png?raw=true)\n\n```csharp\n_dialogService.ShowDialog(Locator.Current.GetService\u003cMyDialogViewModel\u003e(), DialogCallback);\n\nprivate void DialogCallback(MyDialogViewModel obj)\n{\n    Message = obj.DialogMessage;\n}\n```\n### Custom Button Text\n```csharp\nprivate void ShowCustomizedDialogCommandExecuted()\n{\n    var vm = Locator.Current.GetService\u003cMyDialogViewModel\u003e();\n    vm.AcceptCommandText = \"Accept\";\n    vm.CancelCommandText = \"Oh No!\";\n    \n    _dialogService.ShowDialog(vm, DialogCallback);\n}\n```\n### Alternate Views\n```csharp\nprivate void ShowCustomizedDialogCommandExecuted()\n{\n    var vm = Locator.Current.GetService\u003cMyDialogViewModel\u003e();\n    vm.AcceptCommandText = \"Accept\";\n    vm.CancelCommandText = \"Oh No!\";\n    \n    _dialogService.ShowDialog(new MyAlternateDialogView(), vm, DialogCallback);\n}\n```\n### Default Key Mapping\nThe dialog buttons are also associated with their keyboard inputs.\n```xml\n\u003cWindow.KeyBindings\u003e\n    \u003cKeyBinding Gesture=\"Escape\" Command=\"{Binding CancelCommand}\" /\u003e\n    \u003cKeyBinding Gesture=\"Enter\" Command=\"{Binding AcceptCommand}\" /\u003e\n\u003c/Window.KeyBindings\u003e\n```\n## Show Child Window\n![jamsoft-logo](https://github.com/jamsoft/JamSoft.AvaloniaUI.Dialogs/blob/master/src/img/child-window.png?raw=true)\n```csharp\nprivate void ShowChildWindowCommandExecuted()\n{\n    var vm = Locator.Current.GetService\u003cMyChildViewModel\u003e();\n\n    // these values could be stored in user settings and loaded at runtime etc.\n    vm.RequestedLeft = 50;\n    vm.RequestedTop = 50;\n    vm.RequestedHeight = 600;\n    vm.RequestedWidth = 800;\n    vm.ChildMessage = \"Child Message Value\";\n    vm.ChildWindowTitle = \"My Child Window Title\";\n    \n    _dialogService.ShowChildWindow(vm, model =\u003e\n    {\n        Message = $\"Child Closed - {model.ChildMessage}\";\n    });\n}\n```\n\nThe child windows are draggable and also update these properties in real-time. This means that your application can easily restore child window positions between application runs by storing these values.\n\n## Show Child Window - Alternate View Parameter\n```csharp\nprivate void ShowChildWindowCommandExecuted()\n{\n    var vm = Locator.Current.GetService\u003cMyChildViewModel\u003e();\n\n    ...\n    \n    _dialogService.ShowChildWindow(new MyAlternateChildView(), vm, model =\u003e\n    {\n        Message = $\"Child Closed - {model.ChildMessage}\";\n    });\n}\n```\n## Wizard Control\nThe library also has a wizard control allowing multiple page dialogs. You can define a wizard like this:\n\n![wizard-control](https://github.com/jamsoft/JamSoft.AvaloniaUI.Dialogs/blob/master/src/img/wizard.png?raw=true)\n\n```csharp\nprivate void WizardViewCommandExecuted()\n{\n    var vm = Locator.Current.GetService\u003cMyWizardViewModel\u003e();\n    \n    vm.RequestedLeft = MyUserSettings.Instance.Left;\n    vm.RequestedTop = MyUserSettings.Instance.Top;\n    vm.RequestedHeight = MyUserSettings.Instance.Height;\n    vm.RequestedWidth = MyUserSettings.Instance.Width;\n    \n    vm.ChildWindowTitle = \"My Wizard\";\n    \n    _dialogService.StartWizard(vm, model =\u003e\n    {\n        Message = $\"Wizard Closed - {model.GetType()}\";\n    });\n}\n```\n\n```xml\n\u003ccontrols:Wizard ButtonPlacement=\"Bottom\" ProgressPlacement=\"Bottom\"\u003e\n    \n    \u003ccontrols:WizardStep Header=\"Page 1\" StepComplete=\"{Binding WizardStepOneComplete}\"\u003e\n        \u003ccontrols:WizardStep.Content\u003e\n            \u003cStackPanel Orientation=\"Vertical\" Spacing=\"20\"\u003e\n                \u003cTextBlock\u003ePage 1\u003c/TextBlock\u003e\n                \u003cTextBox Foreground=\"White\" Text=\"{Binding ValueOne}\"/\u003e\n            \u003c/StackPanel\u003e\n        \u003c/controls:WizardStep.Content\u003e\n    \u003c/controls:WizardStep\u003e\n    \n    \u003ccontrols:WizardStep Header=\"Page 2\" StepComplete=\"{Binding WizardStepTwoComplete}\"\u003e\n        \u003ccontrols:WizardStep.Content\u003e\n            \u003cStackPanel Orientation=\"Vertical\" Spacing=\"20\"\u003e\n                \u003cTextBlock\u003ePage 2\u003c/TextBlock\u003e\n                \u003cTextBox Foreground=\"White\" Text=\"{Binding ValueTwo}\"/\u003e\n            \u003c/StackPanel\u003e\n        \u003c/controls:WizardStep.Content\u003e\n    \u003c/controls:WizardStep\u003e\n    \n    \u003ccontrols:WizardStep Header=\"Page 3\" StepComplete=\"{Binding WizardStepThreeComplete}\"\u003e\n        \u003ccontrols:WizardStep.Content\u003e\n            \u003cStackPanel Orientation=\"Vertical\" Spacing=\"20\"\u003e\n                \u003cTextBlock\u003ePage 3\u003c/TextBlock\u003e\n                \u003cTextBox Foreground=\"White\" Text=\"{Binding ValueThree}\"/\u003e\n            \u003c/StackPanel\u003e\n        \u003c/controls:WizardStep.Content\u003e\n    \u003c/controls:WizardStep\u003e\n    \n    \u003ccontrols:WizardStep Header=\"Page 4\" StepComplete=\"{Binding WizardStepFourComplete}\"\u003e\n        \u003ccontrols:WizardStep.Content\u003e\n            \u003cStackPanel Orientation=\"Vertical\" Spacing=\"20\"\u003e\n                \u003cTextBlock\u003eFinal Step\u003c/TextBlock\u003e\n                \u003cTextBox Foreground=\"White\" Text=\"{Binding ValueFour}\"/\u003e\n            \u003c/StackPanel\u003e\n        \u003c/controls:WizardStep.Content\u003e\n    \u003c/controls:WizardStep\u003e\n    \n\u003c/controls:Wizard\u003e\n```\nThe `WizardStep` defines a bindable property called `StepComplete` which you can bind in your view model to control step validation and navigation. It also makes use of the `ChildWindow` so inherits the position awareness should you want that functionality.\n\n\n# Saving \u0026 Restoring Window Positions\nFirst you need a mechanism to store positions as set by the user moving things around.\n```csharp\npublic class MyUserSettings : SettingsBase\u003cMyUserSettings\u003e\n{\n    public double Left { get; set; } = 50;\n    public double Top { get; set; } = 50;\n    public double Height { get; set; } = 600;\n    public double Width { get; set; } = 800;\n}\n```\n`SettingsBase\u003cT\u003e` can be found in the JamSoft.Helpers package https://github.com/jamsoft/JamSoft.Helpers\n\nNuget - https://www.nuget.org/packages/JamSoft.Helpers\n\nThen in your view model you can listen for the `RequestCloseDialog` event and respond accordingly by storing the settings in the `OnRequestCloseDialog` method.\n```csharp\npublic class MyChildWindowViewModel : ChildWindowViewModel\n{\n    private string? _childMessage;\n    \n    public MyChildWindowViewModel()\n    {\n        RequestCloseDialog += OnRequestCloseDialog;\n    }\n    \n    public string? ChildMessage\n    {\n        get =\u003e _childMessage;\n        set =\u003e RaiseAndSetIfChanged(ref _childMessage, value);\n    }\n    \n    private void OnRequestCloseDialog(object? sender, RequestCloseDialogEventArgs e)\n    {\n        MyUserSettings.Instance.Top = RequestedTop;\n        MyUserSettings.Instance.Left = RequestedLeft;\n        MyUserSettings.Instance.Width = RequestedWidth;\n        MyUserSettings.Instance.Height = RequestedHeight;\n        \n        RequestCloseDialog -= OnRequestCloseDialog;\n    }\n}\n```\nThe next time this view model is requested by the user you can then restore these values.\n```csharp\nvm.RequestedLeft = MyUserSettings.Instance.Left;\nvm.RequestedTop = MyUserSettings.Instance.Top;\nvm.RequestedHeight = MyUserSettings.Instance.Height;\nvm.RequestedWidth = MyUserSettings.Instance.Width;\n\nvm.ChildWindowTitle = \"My Custom Child Window Title\";\n\n_dialogService.ShowChildWindow(vm, model =\u003e\n{\n    Message = $\"Child Remember Position Closed - {model.GetType()}\";\n});\n```\nSee the Sample Application for a complete implementation example and further guidance.\n\n## Application Styles\nYou can easily target elements of the dialogs via their names and types, such as:\n```xml\n\u003cApplication\u003e\n    \u003cApplication.Styles\u003e\n        \n        \u003cStyle Selector=\"Button.CloseChildButton:pointerover /template/ Border\"\u003e\n                \u003cSetter Property=\"Background\" Value=\"#c42b1c\" /\u003e\n        \u003c/Style\u003e\n        \n        \u003cStyle Selector=\"DockPanel#ChromeDockPanel\"\u003e\n                \u003cSetter Property=\"Height\" Value=\"32\"/\u003e\n                \u003cSetter Property=\"Background\" Value=\"#000000\"/\u003e\n        \u003c/Style\u003e\n        \n        \u003cStyle Selector=\"TextBlock#ChromeDockPanelTitle\"\u003e\n                \u003cSetter Property=\"FontSize\" Value=\"12\"/\u003e\n                \u003cSetter Property=\"VerticalAlignment\" Value=\"Center\" /\u003e\n                \u003cSetter Property=\"Margin\" Value=\"10,0\"/\u003e\n        \u003c/Style\u003e\n\n        \u003c!-- Override Wizard complete ellipse fill and stroke --\u003e\n        \u003cStyle Selector=\"controls|WizardStep:complete /template/ Ellipse#PART_SelectedPipe\"\u003e\n            \u003cSetter Property=\"Fill\" Value=\"DeepPink\" /\u003e\n            \u003cSetter Property=\"StrokeThickness\" Value=\"0\" /\u003e\n        \u003c/Style\u003e\n\n        \u003c!-- Hide the child window Chrome --\u003e\n        \u003cStyle Selector=\"DockPanel#ChromeDockPanel\"\u003e\n            \u003cSetter Property=\"IsVisible\" Value=\"False\" /\u003e\n        \u003c/Style\u003e\n        \n    \u003c/Application.Styles\u003e\n\u003c/Application\u003e\n```\n#### Known Issues\nWindow sizes and positions on Linux not always accurate due to window manager differences. Under investigation. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamsoft%2FJamSoft.AvaloniaUI.Dialogs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamsoft%2FJamSoft.AvaloniaUI.Dialogs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamsoft%2FJamSoft.AvaloniaUI.Dialogs/lists"}