Skip to content

The easiest, most robust way to handle dialogs in Avalonia.

License

Notifications You must be signed in to change notification settings

Bip901/AvaloniaDialogs

Repository files navigation

AvaloniaDialogs

NuGet version

This library wraps DialogHost.Avalonia, providing a more convenient API and built-in common dialogs such as a Yes/No popup and a snackbar.

Improvements over DialogHost.Avalonia

  • Convenient async APIs - spawning a dialog is as easy as:
SingleActionDialog dialog = new() {
    Message = "Hello from C# code!",
    ButtonText = "Click me!"
};
await dialog.ShowAsync();
  • Built-in common dialogs: Loading Dialog, Snackbar, Twofold (e.g. Yes/No), Threefold (e.g. Cancel/Discard/Save)
  • Easy extensibility: to create your own dialogs, just inherit from BaseDialog (or BaseDialog<> if your dialog returns a result). For example, here's a custom dialog that displays a slider and returns the user's selection.
  • Added support for nested dialogs - that is, opening a new dialog while another is showing on the same DialogHost.
  • Improved keyboard UX - this library ensures correct keyboard focus to prevent interacting with elements below the dialog; Dialogs can be closed by pressing Escape by default; and more.

About

The easiest, most robust way to handle dialogs in Avalonia.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages