File: System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\KeyboardEnabledRadioButton.cs
Project: ndp\cdf\src\NetFx40\Tools\System.Activities.Presentation.csproj (System.Activities.Presentation)
//----------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
//----------------------------------------------------------------
namespace System.Activities.Presentation.Internal.PropertyEditing 
{
    using System.Windows.Controls;
    using System.Windows.Input;
 
    // <summary>
    // WPF's RadioButton responds to Space key to trigger selection, but
    // not the Enter or Return keys.  This class responds to both.
    // </summary>
    internal class KeyboardEnabledRadioButton : RadioButton 
    {
        protected override void OnKeyDown(KeyEventArgs e) 
        {
            if (e.Key == Key.Enter ||
                e.Key == Key.Return) 
            {
 
                this.IsChecked = true;
                e.Handled = true;
            }
 
            base.OnKeyDown(e);
        }
    }
}