Created
May 3, 2019 14:33
-
-
Save brunossn/8470a176bc6b78af60337fda77f60f4e to your computer and use it in GitHub Desktop.
A Window.ShowDialog() overload method to set the onwer window.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class WindowExtension | |
{ | |
public static bool? ShowDialog(this Window window, Window parentWindow) | |
{ | |
window.Owner = parentWindow; | |
return window.ShowDialog(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use:
Instead: