DrawingAttributes.Height Property
Gets or sets the y-axis dimension, or height, of the pen tip when drawing ink.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public Property Height As Single
'Usage
Dim instance As DrawingAttributes
Dim value As Single
value = instance.Height
instance.Height = value
public float Height { get; set; }
public:
property float Height {
float get ();
void set (float value);
}
public function get Height () : float
public function set Height (value : float)
Property Value
Type: System.Single
The y-axis dimension, or height, of the pen tip when drawing ink.
Value |
Meaning |
---|---|
1 |
The height of the pen tip is one (1) HIMETRIC unit. |
Single |
Value representing the height of the pen tip, in HIMETRIC units. |
Remarks
The Height property is in HIMETRIC units.
This property applies only to the Rectangle pen tip, which is the PenTip enumeration value. The value represents the height of the side of the rectangle. If using the Ball pen tip value, then the height of the pen tip is equal to the Width property, and the Height property is ignored.
Precision is limited to one one-thousandth of a HIMETRIC unit (three digits to the right of the decimal point). For example, if you specify a value of 2.0006, the most precise measurement is 2.001.
Examples
This C# example creates event handlers for menu items that change the Height property of a DrawingAttributes object.
using Microsoft.Ink;
//...
private System.Windows.Forms.MenuItem menuInkHeightShort;
private System.Windows.Forms.MenuItem menuInkHeightTall;
private InkCollector theInkCollector;
private System.Windows.Forms.MenuItem checkedHeight;
//...
private void menuInkHeightShort_Click(
object sender, System.EventArgs e)
{
checkedHeight.Checked = false;
// Set the height to about one pixel in HIMETRIC
theInkCollector.DefaultDrawingAttributes.Height = 30;
checkedHeight = menuInkHeightShort;
checkedHeight.Checked = true;
Refresh();
}
private void menuInkHeightTall_Click(
object sender, System.EventArgs e)
{
checkedHeight.Checked = false;
// Set the height about ten pixels tall in HIMETRIC
theInkCollector.DefaultDrawingAttributes.Height = 300;
checkedHeight = menuInkHeightTall;
checkedHeight.Checked = true;
Refresh();
}
This Microsoft® Visual Basic® .NET example creates event handlers for menu items that change the Height property of a DrawingAttributes object.
Imports Microsoft.Ink
'...
Dim MenuInkHeightShort As System.Windows.Forms.MenuItem
Dim MenuInkHeightTall As System.Windows.Forms.MenuItem
Dim CheckedHeight As System.Windows.Forms.MenuItem
Dim theInkCollector As InkCollector
'...
Private Sub MenuInkHeightShort_Click( _
ByVal sender As Object, ByVal e As System.EventArgs)
CheckedHeight.Checked = False
'Set the pen about one pixel tall in HIMETRIC
theInkCollector.DefaultDrawingAttributes.Height = 30
CheckedHeight = MenuInkHeightShort
CheckedHeight.Checked = True
Refresh()
End Sub
Private Sub MenuInkHeightTall_Click( _
ByVal sender As Object, ByVal e As System.EventArgs)
CheckedHeight.Checked = False
'Set the pen about ten pixels tall in HIMETRIC
theInkCollector.DefaultDrawingAttributes.Height = 300
CheckedHeight = MenuInkHeightTall
CheckedHeight.Checked = True
Refresh()
End Sub
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