[amd64/tramp] hide interpreter specific trampoline behind ifdef
[mono.git] / mcs / class / referencesource / System.Activities.Presentation / System.Activities.Presentation / System / Activities / Presentation / Base / Core / Internal / PropertyEditing / KeyboardEnabledRadioButton.cs
1 //----------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation.  All rights reserved.
3 //----------------------------------------------------------------
4 namespace System.Activities.Presentation.Internal.PropertyEditing 
5 {
6     using System.Windows.Controls;
7     using System.Windows.Input;
8
9     // <summary>
10     // WPF's RadioButton responds to Space key to trigger selection, but
11     // not the Enter or Return keys.  This class responds to both.
12     // </summary>
13     internal class KeyboardEnabledRadioButton : RadioButton 
14     {
15         protected override void OnKeyDown(KeyEventArgs e) 
16         {
17             if (e.Key == Key.Enter ||
18                 e.Key == Key.Return) 
19             {
20
21                 this.IsChecked = true;
22                 e.Handled = true;
23             }
24
25             base.OnKeyDown(e);
26         }
27     }
28 }