private void _okButton_Click(object sender, RoutedEventArgs e) { _text = _textBox.Text; this.DialogResult = true; }