internal virtual bool SupportsExpandCollapse ()
{
Accessible testAccessible;
Atspi.Action action;
if (this is DataItemElement) {
Element child = FirstChild as Element;
if (child == null)
return false;
testAccessible = child.accessible;
} else
testAccessible = accessible;
action = testAccessible.QueryAction ();
if (action == null)
return false;
ActionDescription [] actions = action.Actions;
for (int i = 0; i < actions.Length; i++)
if (actions [i].Name == "expand or contract" ||
actions [i].Name == "expand or collapse")
return testAccessible.StateSet.Contains (StateType.Expandable);
return false;
}