UIItem scroll Into View

Jan 28, 2010 at 12:42 PM



is there an easy way to scroll an element into View (if in a scrollable context).


in the moment we use


public static void ScrollAutomationElement(AutomationElement element)
      AutomationPattern automationPatternFromElement = GetSpecifiedPattern(element, "ScrollItemPatternIdentifiers.Pattern");

      if (automationPatternFromElement != null)
        ScrollItemPattern scrollPattern = (ScrollItemPattern)element.GetCurrentPattern(automationPatternFromElement);

GetSpecifiedPattern checks if the needed pattern exists