TextBoxBase.ViewportHeight 속성

정의

스크롤 가능한 콘텐츠 영역의 세로 크기를 가져옵니다.

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

속성 값

Double

스크롤 가능한 콘텐츠 영역의 세로 크기를 장치 독립적 단위(단위당 1/96인치)로 지정하는 부동 소수점 값입니다.

텍스트 편집 컨트롤이 스크롤을 지원하도록 구성되지 않은 경우 이 속성의 값은 0.0입니다.

이 속성에는 기본값이 없습니다.

예제

다음 예제에서는 속성의 ViewportHeight 값을 읽는 방법을 보여 줍니다.

private void initValues(object sender, EventArgs e)
{
    myTB1.Text= "ExtentHeight is currently " + myTextBox.ExtentHeight.ToString();
    myTB2.Text= "ExtentWidth is currently " + myTextBox.ExtentWidth.ToString();
    myTB3.Text= "HorizontalOffset is currently " + myTextBox.HorizontalOffset.ToString();
    myTB4.Text= "VerticalOffset is currently " + myTextBox.VerticalOffset.ToString();
    myTB5.Text = "ViewportHeight is currently " + myTextBox.ViewportHeight.ToString();
    myTB6.Text = "ViewportWidth is currently " + myTextBox.ViewportWidth.ToString();
    radiobtn1.IsChecked = true;
}
Private Sub initValues(ByVal sender As Object, ByVal e As EventArgs)
    myTB1.Text = "ExtentHeight is currently " + myTextBox.ExtentHeight.ToString()
    myTB2.Text = "ExtentWidth is currently " + myTextBox.ExtentWidth.ToString()
    myTB3.Text = "HorizontalOffset is currently " + myTextBox.HorizontalOffset.ToString()
    myTB4.Text = "VerticalOffset is currently " + myTextBox.VerticalOffset.ToString()
    myTB5.Text = "ViewportHeight is currently " + myTextBox.ViewportHeight.ToString()
    myTB6.Text = "ViewportWidth is currently " + myTextBox.ViewportWidth.ToString()
    radiobtn1.IsChecked = True

적용 대상

추가 정보