ScrollPattern.VerticalViewSizeProperty Field

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Identifies the VerticalViewSize property.

C#
public static readonly System.Windows.Automation.AutomationProperty VerticalViewSizeProperty;

Field Value

Examples

In the following example, a root element is passed to a function that returns the current vertical and horizontal sizes of the viewable region as percentages of the total content area.

C#
///--------------------------------------------------------------------
/// <summary>
/// Obtains the current vertical and horizontal sizes of the viewable  
/// region as percentages of the total content area.
/// </summary>
/// <param name="targetControl">
/// The automation element of interest.
/// </param>
/// <returns>
/// The horizontal and vertical view sizes.
/// </returns>
///--------------------------------------------------------------------
private double[] GetViewSizes(AutomationElement targetControl)
{
    if (targetControl == null)
    {
        throw new ArgumentNullException(
            "AutomationElement argument cannot be null.");
    }

    double[] viewSizes = new double[2];

    viewSizes[0] =
        (double)targetControl.GetCurrentPropertyValue(
        ScrollPattern.HorizontalViewSizeProperty);

    viewSizes[1] =
         (double)targetControl.GetCurrentPropertyValue(
         ScrollPattern.VerticalViewSizeProperty);

    return viewSizes;
}

Remarks

This identifier is used by UI Automation client applications. UI Automation providers should use the equivalent field in ScrollPatternIdentifiers.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also