Functionality8.xaml.cs 665 Bytes
Newer Older
Mattia's avatar
Mattia committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
using System;
using System.Collections.Generic;

using Xamarin.Forms;

namespace SampleApp.Views
{
    public partial class Functionality8 : ContentPage
    {
        public Functionality8()
        {
            InitializeComponent();
            AutomationProperties.SetIsInAccessibleTree(label, true);
            AutomationProperties.SetIsInAccessibleTree(entry, true);

            // this only works on Android
            AutomationProperties.SetLabeledBy(entry, label);

            //iOS
            if (Device.RuntimePlatform == Device.iOS)
            {
                AutomationProperties.SetName(entry, label.Text);
            }
        }
    }
}