/// <summary> /// Отправка сообщений по клавише Enter /// </summary> private async void MessageTextBox_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) { if (messageTextBox.Text.Length > 0 && e.Key == Key.Enter) { await client.SendMessageAsync(messageTextBox.Text); messageTextBox.Text = ""; } }