Functionality1.xaml.cs 944 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 27 28 29 30 31 32 33 34 35 36 37 38
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using Xamarin.Forms;

namespace SampleApp.Views
{
    [DesignTimeVisible(false)]
    public partial class Functionality1 : ContentPage
    {
        public Functionality1()
        {
            
            InitializeComponent();
         
            
            AutomationProperties.SetIsInAccessibleTree(forkImage, true);
            AutomationProperties.SetName(forkImage, "fork image");
            
            
        }

        void OnToggled(object sender, ToggledEventArgs e)
        {
            // Perform an action after examining e.Value
            
            if(e.Value)
            {
                AutomationProperties.SetIsInAccessibleTree(forkImage, true);
            }
            else
            {
                AutomationProperties.SetIsInAccessibleTree(forkImage, false);
            }
        }
    }
}