DrawingAttributes.Height - свойство
Обновлен: Ноябрь 2007
Gets or sets the y-axis dimension, or height, of the pen tip when drawing ink.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink (в Microsoft.Ink.dll)
Синтаксис
'Декларация
Public Property Height As Single
'Применение
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);
}
/** @property */
public float get_Height()
/** @property */
public void set_Height(float value)
public function get Height () : float
public function set Height (value : float)
Значение свойства
Тип: 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. |
Заметки
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.
Примеры
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
Платформы
Windows Vista
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0