summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core
diff options
context:
space:
mode:
authorSamantha Houts <samhouts@users.noreply.github.com>2017-05-10 06:50:20 (GMT)
committerStephane Delcroix <stephane@delcroix.org>2017-05-10 06:50:20 (GMT)
commitc1fbfae03ca04dd70a31a00042c745658cc8bd97 (patch)
tree721fb18fc7f4544a1838434e904c2bd99d15646b /Xamarin.Forms.Core
parentd6adff2e414fc73ea081a150092b2efd2a54f03e (diff)
downloadxamarin-forms-c1fbfae03ca04dd70a31a00042c745658cc8bd97.zip
xamarin-forms-c1fbfae03ca04dd70a31a00042c745658cc8bd97.tar.gz
xamarin-forms-c1fbfae03ca04dd70a31a00042c745658cc8bd97.tar.bz2
[Core] Accessibility works with XamlC (#911)
* Add unit tests for a11y XAML parsing * [Core] Add Get/Set methods for XamlC * Update docs * Fix rogue blank line
Diffstat (limited to 'Xamarin.Forms.Core')
-rw-r--r--Xamarin.Forms.Core/Accessibility.cs42
1 files changed, 41 insertions, 1 deletions
diff --git a/Xamarin.Forms.Core/Accessibility.cs b/Xamarin.Forms.Core/Accessibility.cs
index e866d31..074d5c5 100644
--- a/Xamarin.Forms.Core/Accessibility.cs
+++ b/Xamarin.Forms.Core/Accessibility.cs
@@ -1,4 +1,4 @@
-
+
namespace Xamarin.Forms
{
public class Accessibility
@@ -10,5 +10,45 @@ namespace Xamarin.Forms
public static readonly BindableProperty LabeledByProperty = BindableProperty.Create("LabeledBy", typeof(VisualElement), typeof(Element), default(VisualElement));
public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(Element), default(string));
+
+ public static string GetHint(BindableObject bindable)
+ {
+ return (string)bindable.GetValue(HintProperty);
+ }
+
+ public static bool? GetIsInAccessibleTree(BindableObject bindable)
+ {
+ return (bool?)bindable.GetValue(IsInAccessibleTreeProperty);
+ }
+
+ public static VisualElement GetLabeledBy(BindableObject bindable)
+ {
+ return (VisualElement)bindable.GetValue(LabeledByProperty);
+ }
+
+ public static string GetName(BindableObject bindable)
+ {
+ return (string)bindable.GetValue(NameProperty);
+ }
+
+ public static void SetHint(BindableObject bindable, string value)
+ {
+ bindable.SetValue(HintProperty, value);
+ }
+
+ public static void SetIsInAccessibleTree(BindableObject bindable, bool? value)
+ {
+ bindable.SetValue(IsInAccessibleTreeProperty, value);
+ }
+
+ public static void SetLabeledBy(BindableObject bindable, VisualElement value)
+ {
+ bindable.SetValue(LabeledByProperty, value);
+ }
+
+ public static void SetName(BindableObject bindable, string value)
+ {
+ bindable.SetValue(NameProperty, value);
+ }
}
}