wpfui
wpfui copied to clipboard
Close() with MessageBoxResult isn't implemented
Describe the bug
Overriding OnButtonClick()
in the WPFUI MessageBox doesn't allow me to just call Close()
, throwing an InvalidOperationException asking me to use the version with MessageBoxResult.
Which would be fine... if that method existed? MessageBox
doesn't seem to have a Close(MessageBoxResult)
method implemented, instead relying on the WPF Close()
internally.
To Reproduce
Try subclassing MessageBox
and overriding OnButtonClick()
Expected behavior
Being able to Close() the popup myself without having to downcast to Window
Screenshots
No response
OS version
Irrelevant
.NET version
Irrelevant
WPF-UI NuGet version
3.0.3
Additional context
https://github.com/lepoco/wpfui/blob/bf3c4a6be4ed05a3ab3f34fd0e88b2fe191714bb/src/Wpf.Ui/Controls/MessageBox/MessageBox.cs#L302
https://github.com/lepoco/wpfui/blob/development/src/Wpf.Ui/Controls/MessageBox/MessageBox.cs#L302