1 //----------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 //----------------------------------------------------------------
4 namespace System.Activities.Presentation.Internal.PropertyEditing
6 using System.Windows.Controls;
7 using System.Windows.Input;
10 // WPF's RadioButton responds to Space key to trigger selection, but
11 // not the Enter or Return keys. This class responds to both.
13 internal class KeyboardEnabledRadioButton : RadioButton
15 protected override void OnKeyDown(KeyEventArgs e)
17 if (e.Key == Key.Enter ||
21 this.IsChecked = true;