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/PropertyEditorPanel.cs')
-rw-r--r--Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs20
1 files changed, 19 insertions, 1 deletions
diff --git a/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs b/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs
index 1463c48..6e5da45 100644
--- a/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs
+++ b/Xamarin.PropertyEditing.Mac/PropertyEditorPanel.cs
@@ -108,12 +108,16 @@ namespace Xamarin.PropertyEditing.Mac
string imageName = GetIconName (item.ArrangeMode);
TabButton arrangeMode = new TabButton (this.hostResources, imageName) {
Bounds = new CGRect (0, 0, 32, 30),
+ Selected = item.IsChecked,
Tag = i,
- Selected = item.IsChecked
+ ToolTip = GetTooltip (item.ArrangeMode),
};
arrangeMode.Clicked += OnArrangeModeChanged;
+ arrangeMode.AccessibilityEnabled = true;
+ arrangeMode.AccessibilityTitle = string.Format (Properties.Resources.ArrangeByButtonName, item.ArrangeMode.ToString());
+
this.tabStack.AddView (arrangeMode, NSStackViewGravity.Top);
}
}
@@ -160,6 +164,8 @@ namespace Xamarin.PropertyEditing.Mac
((NSView)this.header.ContentView).AddSubview (this.propertyFilter);
this.propertyFilter.Changed += OnPropertyFilterChanged;
+ this.propertyFilter.AccessibilityEnabled = true;
+ this.propertyFilter.AccessibilityTitle = Properties.Resources.AccessibilityPropertyFilter;
this.tabStack = new NSStackView {
Orientation = NSUserInterfaceLayoutOrientation.Horizontal,
@@ -251,5 +257,17 @@ namespace Xamarin.PropertyEditing.Mac
throw new ArgumentException();
}
}
+
+ private string GetTooltip (PropertyArrangeMode mode)
+ {
+ switch (mode) {
+ case PropertyArrangeMode.Name:
+ return string.Format("{0} {1}", Properties.Resources.ArrangeByLabel, Properties.Resources.ArrangeByName);
+ case PropertyArrangeMode.Category:
+ return string.Format ("{0} {1}", Properties.Resources.ArrangeByLabel, Properties.Resources.ArrangeByCategory);
+ default:
+ throw new ArgumentException ();
+ }
+ }
}
}