How do I get System.Windows.ShowDialog()
to return 'true'?
I am a little new to this. System.Windows.ShowDialog
's return type is bool
? It is supposed to return true
when you hit Submit
, and false
when you hit Cancel
. But I am not sure how to designate which Button
is the official submit button.
EDIT:
On a related note, I am curious as to how it can return null.
Best Answer
http://msdn.microsoft.com/en-us/library/system.windows.window.showdialog.aspx
Basically, you decide by setting the value of the DialogResult, not by hitting a particular button -- you decide what the button does.