title: C# - Return variable from child window to parent window in WPF
body: <p>I have a main window called form1. in form1 I have a button, when it is pressed it will open form2 (form2.ShowDialog()). In form2 I have a button called "Check".  When the user clicks on "Check" it should do some validation and if successful creates a string object and return it to form1. Any Ideas on how to implement this? I don't want to return anything when the user closes the window.</p>