Skip to main content
Logo Appt Light

Accessibility link on Xamarin

Links should be accessible for users of assistive technologies. When accessibility is not taken into account, users might not be able to find or activate links.

In Xamarin, you need to follow four steps to create links:

  1. Set the TextColor and TextDecoration properties of the Label or Span.

  2. Add a TapGestureRecognizer to the GestureRecognizers collection of the Label or Span, whose Command property binds to a ICommand, and whose CommandParameter property contains the URL to open.

  3. Define the ICommand that will be executed by the TapGestureRecognizer.

  4. Write the code that will be executed by the ICommand.

For more information, see Xamarin Hyperlinks, it includes information how you can create your own Hyperlink class.

            <Span Text="Read more about " />
            <Span Text="Appt"
                    <TapGestureRecognizer Command="{Binding TapCommand}"
                                          CommandParameter="" />


Let us know!