diff options
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/CombinablePropertyEditor.cs')
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/CombinablePropertyEditor.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/CombinablePropertyEditor.cs b/Xamarin.PropertyEditing.Mac/Controls/CombinablePropertyEditor.cs index 5122f24..c2ce8a5 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/CombinablePropertyEditor.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/CombinablePropertyEditor.cs @@ -83,8 +83,21 @@ namespace Xamarin.PropertyEditing.Mac } // Set our tabable order - this.firstKeyView = this.combinableList.KeyAt (0); - this.lastKeyView = this.combinableList.KeyAt (this.combinableList.Count - 1); + var firstButton = (FocusableBooleanButton) this.combinableList.KeyAt (0); + this.firstKeyView = firstButton; + + var lastButton = (FocusableBooleanButton)this.combinableList.KeyAt (this.combinableList.Count - 1); + this.lastKeyView = lastButton; + + if (combinableList.Count > 0) + { + if (firstButton == lastButton) { + firstButton.ProxyResponder = new ProxyResponder (this, ProxyRowType.SingleView); + } else { + firstButton.ProxyResponder = new ProxyResponder (this, ProxyRowType.FirstView); + lastButton.ProxyResponder = new ProxyResponder (this, ProxyRowType.LastView); + } + } SetEnabled (); |