예제 #1
0
            private ComboBoxItemAccessibleObject?GetSelectedComboBoxItemAccessibleObject()
            {
                // We should use the SelectedIndex property instead of the SelectedItem to avoid the problem of getting
                // the incorrect item when the list contains duplicate items https://github.com/dotnet/winforms/issues/3590
                int selectedIndex = _owningComboBox.SelectedIndex;

                if (selectedIndex < 0 || selectedIndex > _owningComboBox.Items.Count - 1)
                {
                    return(null);
                }

                Entry selectedItem = _owningComboBox.Entries[selectedIndex];

                return(ItemAccessibleObjects.GetComboBoxItemAccessibleObject(selectedItem));
            }
예제 #2
0
 internal void ResetListItemAccessibleObjects()
 {
     ItemAccessibleObjects.Clear();
 }