I have a WPF application where the window gets small and moved to the side if it gets deactivated. But I dont want this feature to happen if there is a messagebox open on the window. Is there a way we can check if there is any dialog box open in C# code?
Share
Wrap the call to your MessageBox in a static class/method. If this is called set a flag that your MessageBox is open.
Something like this:
Usage:
But you have to make sure to always use the Wrapper to call a MessageBox