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/ProxyResponderButton.cs')
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/Custom/ProxyResponderButton.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/ProxyResponderButton.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/ProxyResponderButton.cs
new file mode 100644
index 0000000..a37479f
--- /dev/null
+++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/ProxyResponderButton.cs
@@ -0,0 +1,26 @@
+using AppKit;
+
+namespace Xamarin.PropertyEditing.Mac
+{
+ internal class ProxyResponderButton : NSButton
+ {
+ public ProxyResponder ProxyResponder { get; set; }
+
+ public override void KeyDown (NSEvent theEvent)
+ {
+ switch (theEvent.KeyCode) {
+ case (int)NSKey.Tab:
+ if (ProxyResponder != null) {
+ if (theEvent.ModifierFlags.HasFlag(NSEventModifierMask.ShiftKeyMask)) {
+ ProxyResponder.PreviousResponder ();
+ } else {
+ ProxyResponder.NextResponder ();
+ }
+ return;
+ }
+ break;
+ }
+ base.KeyDown (theEvent);
+ }
+ }
+}