예제 #1
0
        public override void Invoke()
        {
            switch (_expandCollapsePattern.CurrentExpandCollapseState)
            {
            case ExpandCollapseState.ExpandCollapseState_Collapsed:
                _expandCollapsePattern.Expand();
                break;

            case ExpandCollapseState.ExpandCollapseState_Expanded:
            case ExpandCollapseState.ExpandCollapseState_PartiallyExpanded:
                _expandCollapsePattern.Collapse();
                break;
            }
        }
예제 #2
0
 /// <summary>
 /// Expands the element.
 /// </summary>
 public void Expand()
 {
     _pattern.Expand();
 }
 public static void xtExpand(this IUIAutomationElement element)
 {
     _ExpandCollapsePattern = (IUIAutomationExpandCollapsePattern)element.GetCurrentPattern(UIA_PatternIds.UIA_ExpandCollapsePatternId);
     _ExpandCollapsePattern.Expand();
 }