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:
authorJose Medrano <josmed@microsoft.com>2022-02-16 20:22:39 +0300
committervs-mobiletools-engineering-service2 <valco@microsoft.com>2022-03-01 18:01:15 +0300
commit0a7bce75f503fb8847030b9a62a1acce3ef359e5 (patch)
tree633b7d9ae303006f78cebf2256f9c5428aa258fc
parent08840cce2a0120f1d8061f5c57e4ea2550a5e393 (diff)
Creates ProxyResponderButton and makes base of FocusableBooleanButton
-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; } }