다음을 통해 공유


ScrollPattern.ScrollPatternInformation.VerticalViewSize 속성

정의

현재 세로 뷰 크기를 가져옵니다.

public:
 property double VerticalViewSize { double get(); };
public double VerticalViewSize { get; }
member this.VerticalViewSize : double
Public ReadOnly Property VerticalViewSize As Double

속성 값

Double

UI 자동화 요소 내에서 표시 가능 영역의 세로 크기로, 전체 콘텐츠 영역의 백분율로 표시됩니다. 기본값은 100.0입니다.

예제

다음 예제에서는 ScrollPattern 대상 컨트롤에서 가져온 개체를 전체 콘텐츠 영역의 백분율로 표시 가능 영역의 현재 가로 및 세로 크기를 검색 하는 함수에 전달 합니다.

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

    double[] viewSizes = new double[2];

    viewSizes[0] =
        scrollPattern.Current.HorizontalViewSize;

    viewSizes[1] =
         scrollPattern.Current.VerticalViewSize;

    return viewSizes;
}
'''--------------------------------------------------------------------
''' <summary>
''' Obtains the current vertical and horizontal sizes of the viewable  
''' region as percentages of the total content area.
''' </summary>
''' <param name="scrollPattern">
''' The ScrollPattern control pattern obtained from the 
''' element of interest.
''' </param>
''' <returns>
''' The horizontal and vertical view sizes.
''' </returns>
'''--------------------------------------------------------------------
Private Overloads Function GetViewSizes( _
ByVal scrollPattern As ScrollPattern) As Double()
    If scrollPattern Is Nothing Then
        Throw New ArgumentNullException( _
        "ScrollPattern argument cannot be null.")
    End If

    Dim viewSizes(1) As Double

    viewSizes(0) = scrollPattern.Current.HorizontalViewSize

    viewSizes(1) = scrollPattern.Current.VerticalViewSize

    Return viewSizes

End Function 'GetViewSizes

적용 대상