PenInputPanel.Height (Propiedad)
Actualización: noviembre 2007
Obsoleto. Obtiene el alto del panel de entrada manuscrita en coordenadas de cliente. PenInputPanel se ha reemplazado por Microsoft.Ink.TextInput.
Espacio de nombres: Microsoft.Ink
Ensamblado: Microsoft.Ink (en Microsoft.Ink.dll)
Sintaxis
'Declaración
Public ReadOnly Property Height As Integer
'Uso
Dim instance As PenInputPanel
Dim value As Integer
value = instance.Height
public int Height { get; }
public:
property int Height {
int get ();
}
/** @property */
public int get_Height()
public function get Height () : int
Valor de propiedad
Tipo: System.Int32
Alto del panel de entrada manuscrita en coordenadas de cliente.
Valor |
Significado |
---|---|
120 |
El número de píxeles equivale a 1,25 pulgadas en 96 puntos por pulgada (ppp). |
150 |
El número de píxeles equivale a 1,25 pulgadas en 120 ppp. |
166 |
El número de píxeles equivale a 1,25 pulgadas en 133 ppp. |
Comentarios
El alto del panel de entrada manuscrita depende de la resolución de pantalla del Tablet PC específico.
Si se inicia con Microsoft® Windows® XP Tablet PC Edition 2005, el Panel de entrada de Tablet PC permite al usuario seguir escribiendo a mano aumentando automáticamente el tamaño del Panel de entrada para dar cabida a la nueva escritura a mano. Las propiedades Width y Height no se actualizan para reflejar el nuevo tamaño a medida que el Panel de entrada aumenta su tamaño. Estas propiedades devuelven el tamaño original del Panel de entrada. Tampoco informan de las dimensiones del destino de desplazamiento del puntero del Panel de entrada.
Nota de seguridad: |
---|
Si se usa en entornos de confianza parcial, esta propiedad necesita el permiso SecurityPermissionFlag.AllFlags, además de los permisos requeridos por PenInputPanel. Vea Security and Trust para obtener más información. |
Ejemplos
En este ejemplo de C# se crea un objeto PenInputPanel, thePenInputPanel, y se asocia a un control InkEdit, inkEdit1. A continuación, asocia un controlador de eventos VisibleChanged, VisibleChanged_Event. En el controlador de eventos, agrega una oración al contenido del control de edición al que está asociado el objeto PenInputPanel. La frase indica el alto del panel de entrada manuscrita en píxeles recuperando la propiedad Height y convirtiéndola en una cadena con el método ToString.
[C#]
//...
// Declare the PenInputPanel object
PenInputPanel thePenInputPanel;
public Form1()
{
// Required for Windows Form Designer support
InitializeComponent();
// Create and attach the new PenInputPanel to an InkEdit control.
thePenInputPanel = new PenInputPanel(inkEdit1);
// Add a VisibleChanged event handler
thePenInputPanel.VisibleChanged +=
new PenInputPanelVisibleChangedEventHandler(VisibleChanged_Event);
}
//...
public void VisibleChanged_Event(object sender,
PenInputPanelVisibleChangedEventArgs e)
{
// Make sure the object that generated
// the event is a PenInputPanel object
if (sender is PenInputPanel)
{
PenInputPanel theSenderPanel = (PenInputPanel)sender;
// When the panel has become visible...
if (e.NewVisibility)
{
// Display the height of the panel in the attached edit control
theSenderPanel.AttachedEditControl.Text +=
"The height of the panel is ";
theSenderPanel.AttachedEditControl.Text +=
theSenderPanel.Height.ToString();
theSenderPanel.AttachedEditControl.Text += " pixels.\n";
}
}
}
En este ejemplo de Microsoft Visual Basic® .NET se crea un objeto PenInputPanel, thePenInputPanel, y se asocia a un control InkEdit, InkEdit1. A continuación, asocia un controlador de eventos VisibleChanged, VisibleChanged_Event. En el controlador de eventos, agrega una oración al contenido del control de edición al que está asociado el objeto PenInputPanel. La frase indica el alto del panel de entrada manuscrita en píxeles recuperando la propiedad Height y convirtiéndola en una cadena con el método ToString.
[Visual Basic]
'...
' Declare the PenInputPanel object
Dim thePenInputPanel As PenInputPanel
Public Sub New()
MyBase.New()
' Required for Windows Form Designer support
InitializeComponent()
' Create and attach the new PenInputPanel to an InkEdit control.
thePenInputPanel = New PenInputPanel(InkEdit1)
' Add a VisibleChanged event handler
AddHandler thePenInputPanel.VisibleChanged, _
AddressOf VisibleChanged_Event
End Sub 'New
'...
Public Sub VisibleChanged_Event(sender As Object, e As _
PenInputPanelVisibleChangedEventArgs)
' Make sure the object that generated
' the event is a PenInputPanel object
If TypeOf sender Is PenInputPanel Then
Dim theSenderPanel As PenInputPanel = CType(sender, PenInputPanel)
' When the panel has become visible...
If e.NewVisibility Then
' Display the height of the panel in the attached edit control
theSenderPanel.AttachedEditControl.Text += _
"The height of the panel is "
theSenderPanel.AttachedEditControl.Text += _
theSenderPanel.Height.ToString()
theSenderPanel.AttachedEditControl.Text += " pixels." + ControlChars.Lf
End If
End If
End Sub 'VisibleChanged_Event
Plataformas
Windows Vista
.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
Información de versión
.NET Framework
Compatible con: 3.0