private static void HandleKeyUp(object sender, KeyRoutedEventArgs e) { if (e.Key == VirtualKey.Enter) { _isEnterPressed = false; _command = null; } }