Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/Custom/FocusableBooleanButton.cs')
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/Custom/FocusableBooleanButton.cs23
1 files changed, 22 insertions, 1 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/FocusableBooleanButton.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/FocusableBooleanButton.cs
index f8ed20d..01ad5e0 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/Custom/FocusableBooleanButton.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/FocusableBooleanButton.cs
@@ -3,7 +3,28 @@ using AppKit;
namespace Xamarin.PropertyEditing.Mac
{
- internal class FocusableBooleanButton : NSButton
+ internal class ProxyResponderButton : NSButton
+ {
+ public ProxyRowResponder ResponderProxy { get; set; }
+
+ public override void KeyDown (NSEvent theEvent)
+ {
+ switch (theEvent.KeyCode) {
+ case (int)NSKey.Tab:
+ if (ResponderProxy != null) {
+ if (theEvent.ModifierFlags.HasFlag(NSEventModifierMask.ShiftKeyMask)) {
+ ResponderProxy.PreviousResponder ();
+ } else {
+ ResponderProxy.NextResponder ();
+ }
+ }
+ return;
+ }
+ base.KeyDown (theEvent);
+ }
+ }
+
+ internal class FocusableBooleanButton : ProxyResponderButton
{
public override bool CanBecomeKeyView { get { return Enabled; } }