Last active
August 29, 2015 14:15
-
-
Save ozzieperez/5c9cae3cb47264df0c99 to your computer and use it in GitHub Desktop.
Xamarin.Forms Accessibility - Change the default element selected when screen changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Change default element selected when the screen changes. | |
// In the view controller... | |
public override void ViewDidAppear(bool animated) | |
{ | |
base.ViewDidAppear (animated); | |
//pass in the object to get focus | |
UIAccessibility.PostNotification(UIAccessibilityPostNotification.ScreenChanged, myObject); | |
} | |
// In a constructor or callback, set the text spoken by voiceover when the element is selected... | |
myObject.AccessibilityLabel = “Say something useful.”; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment