Compartir vía


TextBoxBase.ViewportHeight Propiedad

Definición

Obtiene el tamaño vertical del área de contenido desplazable.

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

Valor de propiedad

Double

Valor de punto flotante que especifica el tamaño vertical del área de contenido desplazable, en unidades independientes del dispositivo (1/96 pulgadas por unidad).

El valor de esta propiedad es 0.0 si el control de edición de texto no está configurado para admitir el desplazamiento.

Esta propiedad no tiene ningún valor predeterminado.

Ejemplos

En el ejemplo siguiente se muestra cómo leer el valor de la ViewportHeight propiedad .

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

Se aplica a

Consulte también