Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个无边框窗口并创建了 chrome,但我需要禁用“Alt+Space”快捷方式。有什么想法吗?
我对 WPF 不是很好,但经过一番折腾,这似乎是在正确的轨道上。只需将其放入您的 Window 代码隐藏中:
protected override void OnKeyDown(KeyEventArgs e) { if (Keyboard.Modifiers == ModifierKeys.Alt && e.SystemKey == Key.Space) { e.Handled = true; } else { base.OnKeyDown(e); } }