在选择的控件中添加KeyDown event methodprivate void OnKeyDown(object sender, KeyEventArgs e){if (e.Key == Key.Space) {e.Handled = true;return;}}