PenInputPanel.Height Property
Deprecated. Gets the height of the pen input panel in client coordinates. PenInputPanel has been replaced by Microsoft.Ink.TextInput.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public ReadOnly Property Height As Integer
'Usage
Dim instance As PenInputPanel
Dim value As Integer
value = instance.Height
public int Height { get; }
public:
property int Height {
int get ();
}
public function get Height () : int
Property Value
Type: System.Int32
The height of the pen input panel in client coordinates.
Value |
Meaning |
---|---|
120 |
The number of pixels equal to 1.25 inches at 96 dots per inch (dpi). |
150 |
The number of pixels equal to 1.25 inches at 120 dpi. |
166 |
The number of pixels equal to 1.25 inches at 133 dpi. |
Remarks
The height of the pen input panel is dependent on the screen resolution for the particular Tablet PC.
Starting with Microsoft® Windows® XP Tablet PC Edition 2005, the Tablet PC Input Panel allows the user to continue entering handwriting by automatically increasing the size of the Input Panel to accomodate new handwriting. The Height and Width properties do not update to reflect the new size as the Input Panel grows. These properties return the original size of the Input Panel. They also do not report the dimensions of the Input Panel hover target.
Security Note: |
---|
If using under partial trust, this property requires SecurityPermissionFlag.AllFlags permission, in addition to the permissions required by PenInputPanel. See Security and Trust for more information. |
Examples
This C# example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, inkEdit1. It then attaches a VisibleChanged event handler, VisibleChanged_Event. In the event handler, it adds a sentence to the content of the edit control to which the PenInputPanel is attached. The sentence states the height of the pen input panel in pixels by retrieving the Height property and converting it to a string with the ToString method.
[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";
}
}
}
This Microsoft Visual Basic® .NET example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, InkEdit1. It then attaches a VisibleChanged event handler, VisibleChanged_Event. In the event handler, it adds a sentence to the content of the edit control to which the PenInputPanel is attached. The sentence states the height of the pen input panel in pixels by retrieving the Height property and converting it to a string with the ToString method.
[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
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0