I have a WPF Window created. I have some cases where i want to display it using ShowDialog() and others just using Show().
For the ShowDialog() i want to set the DialogResult which all works fine, however if the window is launched using Show() and i set the DialogResult i get the exception
DialogResult can be set only after Window is created and shown as dialog.
How to i determine how the window was launched so i can place a condition on setting the DialogResult?