Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private async void CommandTextBox_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.Key == Key.Return)
- {
- var textBox = (TextBox)sender;
- if (string.IsNullOrWhiteSpace(textBox.Text))
- {
- return;
- }
- var command = textBox.Text;
- textBox.Text = string.Empty;
- await ExecuteCommand(command);
- }
- }
Add Comment
Please, Sign In to add comment