private void MetroWindow_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter && NextCommand.CanExecute(null)) { NextCommand.Execute(null); } else if (e.Key == Key.Escape) { Close(); } }