First of all, I would like to say that english is not my mother language. I have this Form in windows forms:

with this code:
public partial class FormInput : Form
{
public FormInput(string Content)
{
InitializeComponent();
this.Text = Content;
}
private void button1_Click(object sender, EventArgs e)
{
//confirm
}
private void button2_Click(object sender, EventArgs e)
{
//cancel
}
}
Now, I try to implement it in a WPF window. I want to use it like that:
string foo;
if (FormInput.Show("abc") == true)
{
foo = [Form output as a string];
}
So, I need one input value as a string and two output value as a bool and string. The user have to enter something in the TextBox (textBox1) end click confirm or press enter and the window close. Alternativly, the user can press escape or click cancel. How can I do that?
new, set its properties and callShow()if you want it to be modeless,ShowDialog()if you want it to be modal. If the user clicks OK, you read the properties with the new data. Don't make the textbox a public property to read or set itsTextproperty though