Unplanned
Last Updated: 15 Aug 2017 10:08 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 04 Mar 2016 06:30
Category:
Type: Feature Request
1
ADD. RadDropDownList - add more detailed MSAA support in order to inspect the DropDownListElement.ArrowButton as a separate element
Workaround:

public class CustomDropDown : RadDropDownList 
{
    public override string ThemeClassName
    {
        get
        {
            return typeof(RadDropDownList).FullName;
        }
    }

    protected override AccessibleObject CreateAccessibilityInstance()
    {
        return new CustomRadDropDownListAccessibleObject(this);
    }
}

public class CustomRadDropDownListAccessibleObject : RadDropDownListAccessibleObject
{ 
    public CustomRadDropDownListAccessibleObject(RadDropDownList owner) : base(owner)
    {
    }

    public override int GetChildCount()
    {
        return (this.List.DropDownStyle == RadDropDownStyle.DropDown) ? 3 : 2;
    }

    public override AccessibleObject GetChild(int index)
    {
        if (this.List.DropDownStyle == RadDropDownStyle.DropDown)
        {
            if (index == 0)
            {
                return this.List.DropDownListElement.TextBox.TextBoxItem.HostedControl.AccessibilityObject;
            }
            else if (index == 1)
            {
                return new RadButtonElementAccessibleObject(this.List.DropDownListElement.ArrowButton, "ArrowButton");
            }
            else
            {
                return this.List.DropDownListElement.Popup.AccessibilityObject;
            }
        }
        else
        { 
            if (index == 0)
            {
                return new RadButtonElementAccessibleObject(this.List.DropDownListElement.ArrowButton, "ArrowButton");
            }
            else
            {
                return this.List.DropDownListElement.Popup.AccessibilityObject;
            }
        }
    }
}
0 comments