/// <summary> /// Closes the window. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Button_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(TextBoxTaskName.Text)) { TextBoxTaskName.Focus(); return; } TaskName = TextBoxTaskName.Text; this.Close(); }
/// <summary> /// Default constructor. /// </summary> public TextInput() { InitializeComponent(); TaskName = ""; TextBoxTaskName.Focus(); }