ScrollPattern.HorizontallyScrollableProperty Field
.NET Framework 3.5
Identifies the HorizontallyScrollable property.
Assembly: UIAutomationClient (in UIAutomationClient.dll)
This identifier is used by UI Automation client applications. UI Automation providers should use the equivalent field in ScrollPatternIdentifiers.
In the following example, a root element is passed to a function that returns a collection of UI Automation elements that are descendants of the root and satisfy a set of property conditions.
///-------------------------------------------------------------------- /// <summary> /// Finds all automation elements that satisfy /// the specified condition(s). /// </summary> /// <param name="targetApp"> /// The automation element from which to start searching. /// </param> /// <returns> /// A collection of automation elements satisfying /// the specified condition(s). /// </returns> ///-------------------------------------------------------------------- private AutomationElementCollection FindAutomationElement( AutomationElement targetApp) { if (targetApp == null) { throw new ArgumentException("Root element cannot be null."); } PropertyCondition conditionSupportsScroll = new PropertyCondition( AutomationElement.IsScrollPatternAvailableProperty, true); PropertyCondition conditionHorizontallyScrollable = new PropertyCondition( ScrollPattern.HorizontallyScrollableProperty, true); PropertyCondition conditionVerticallyScrollable = new PropertyCondition( ScrollPattern.VerticallyScrollableProperty, true); // Use any combination of the preceding conditions to // find the control(s) of interest Condition condition = new AndCondition( conditionSupportsScroll, conditionHorizontallyScrollable, conditionVerticallyScrollable); return targetApp.FindAll(TreeScope.Descendants, condition); }
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.