using System; using System.Collections.ObjectModel; using Xamarin.Forms; namespace SampleApp.ViewModels { public class ListPageViewModel { public ObservableCollection APIList { get; set; } public ListPageViewModel() { var listView = new ListView(); APIList = new ObservableCollection(); var accessibilityFocus = new GroupedAPIFunctionality() { LongName = "Accessibility Focus", ShortName = "AF" }; var TextToAnnounce = new GroupedAPIFunctionality() { LongName = "Text To Announce", ShortName = "TTA" }; var explicitTTS = new GroupedAPIFunctionality() { LongName = "Explicit TTS", ShortName = "TTS" }; var accessibilityTree = new GroupedAPIFunctionality() { LongName = "Accessibility Tree", ShortName = "AT" }; var miscellanous = new GroupedAPIFunctionality() { LongName = "Miscellanous", ShortName = "M" }; accessibilityFocus.Add(new APIFunctionality { Name = "1", Description = "Specify which views should receive the accessibility focus" }); accessibilityFocus.Add(new APIFunctionality { Name = "2", Description = "Specify the accessibility focus order", }); accessibilityFocus.Add(new APIFunctionality { Name = "3", Description = "Assign the accessibility focus to a view", Availability = "Indirect implementation", }); accessibilityFocus.Add(new APIFunctionality { Name = "4", Description = "Specify actions associated to accessibility focus-related events (e.g., a view acquires or loses the focus)", Availability = "Indirect implementation", }); accessibilityFocus.Add(new APIFunctionality { Name = "5", Description = "Determine whether a view has the accessibility focus or which view has the accessibility focus", Availability = "Indirect implementation", }); TextToAnnounce.Add(new APIFunctionality { Name = "6", Description = "Specify attributes that contribute to form the text-to-announce", }); TextToAnnounce.Add(new APIFunctionality { Name = "7", Description = "Programmatically define the text-to-announce", Availability = "Not available on XAMARIN", }); TextToAnnounce.Add(new APIFunctionality { Name = "8", Description = "Use one view to describe another one", Availability = "Semi-direct implementation on iOS", }); TextToAnnounce.Add(new APIFunctionality { Name = "9", Description = "Specify that a view should be announced when changed, even without user interaction", Availability = "Not available on XAMARIN", }); TextToAnnounce.Add(new APIFunctionality { Name = "10", Description = "Specify in which language the text-to-announce should be read", Availability = "Not available on XAMARIN", }); explicitTTS.Add(new APIFunctionality { Name = "11", Description = "Read a text with the screen-reader TTS", Availability = "Indirect Implementation", }); explicitTTS.Add(new APIFunctionality { Name = "12", Description = "Be informed when the screen-reader finishes reading an explicitly provided text", Availability = "Not available on XAMARIN", }); explicitTTS.Add(new APIFunctionality { Name = "13", Description = "Customize screen-reader TTS speech features, like pitch, speed, etc...", Availability = "Not available on XAMARIN", }); explicitTTS.Add(new APIFunctionality { Name = "14", Description = "Read a text with non-screen-reader TTS (also works when screen-reader is not active)", }); explicitTTS.Add(new APIFunctionality { Name = "15", Description = "Detect whether the non-screen-reader TTS is reading", Availability = "Not available on XAMARIN", }); explicitTTS.Add(new APIFunctionality { Name = "16", Description = "Pause the non-screen-reader TTS", Availability = "Not available on XAMARIN", }); explicitTTS.Add(new APIFunctionality { Name = "17", Description = "Customize non-screen-reader TTS speech features, like pitch, speed, etc...", }); accessibilityTree.Add(new APIFunctionality { Name = "18", Description = "Aggregate multiple views into a single accessible element", Availability = "Semi-direct implementation on iOS", }); accessibilityTree.Add(new APIFunctionality { Name = "19", Description = "Decompose a view into multiple accessibility elements", Availability = "Not available on XAMARIN", }); accessibilityTree.Add(new APIFunctionality { Name = "20", Description = "Get the parent accessible element", Availability = "Not available on XAMARIN", }); miscellanous.Add(new APIFunctionality { Name = "21", Description = "Detect whether screen-reader is active", Availability = "Indirect implementation", }); miscellanous.Add(new APIFunctionality { Name = "22", Description = "Support navigation by specifying which views are headers or panes", Availability = "Not available on iOS", }); miscellanous.Add(new APIFunctionality { Name = "23", Description = "Define how to respond to user actions that are only available when the screen reader is active", Availability = "Not available on Android", }); miscellanous.Add(new APIFunctionality { Name = "24", Description = "Perform actions on user behalf", Availability = "Not available on XAMARIN", }); miscellanous.Add(new APIFunctionality { Name = "25", Description = "Associate arbitrary accessibility-related information to a view", Availability = "Not available on XAMARIN", }); APIList.Add(accessibilityFocus); APIList.Add(TextToAnnounce); APIList.Add(explicitTTS); APIList.Add(accessibilityTree); APIList.Add(miscellanous); listView.ItemsSource = APIList; listView.IsGroupingEnabled = true; listView.GroupDisplayBinding = new Binding("LongName"); listView.GroupShortNameBinding = new Binding("ShortName"); } } }