Functionality4.xaml.cs 1.09 KB
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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using SampleApp.CustomRenderers;
using Xamarin.Forms;


namespace SampleApp.Views
{
    [DesignTimeVisible(false)]
    public partial class Functionality4 : ContentPage
    {
        
        public static Label myLabel = new Label { Text = "Select the Bell Image with the accessibility focus", HorizontalOptions = LayoutOptions.CenterAndExpand};

        public Functionality4()
        {
            InitializeComponent();

            // immagine campanello
            CustomImage BellImage = new CustomImage
            {
                Source = ImageSource.FromResource("SampleApp.images.bell.png", typeof(Functionality4).GetTypeInfo().Assembly)
            };

            
            AutomationProperties.SetIsInAccessibleTree(myLabel, true);
            AutomationProperties.SetIsInAccessibleTree(BellImage, true);
            AutomationProperties.SetName(BellImage, "Bell Image");

            background.Children.Add(myLabel);
            background.Children.Add(BellImage);
        }
    }
}