Skip to content

ol1ver/AvalonMessageBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AvalonMessageBox

AvalonMessageBox is a drop-in replacement for the standard WPF MessageBox.

Classic MessageBox:

MessageBox.Show("Hello World?", "Greeting", MessageBoxButton.YesNo, MessageBoxImage.Question);

AvalonMessageBox (just add 'Builder'):

MessageBoxBuilder.Show("Hello World?", "Greeting", MessageBoxButton.YesNo, MessageBoxImage.Question);

The code above will produce this window:

image

A more advanced example with custom buttons and larger UI.

var option = new MessageBoxBuilder<string>()
    .Message("This is a text.")
    .Button("An _option to choose", "optA")
    .Button("_Another option", "optB")
    .CloseButton("optC")
    .Zoom(2)
    .Icon(MessageBoxImage.Exclamation)
    .Show();

MessageBoxBuilder.Show($"Selected option: {option}");

This will produce this window:

image

Clicking on 'Another option' will show then this:

image

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages