DrawingAttributes.PenTip - свойство
Обновлен: Ноябрь 2007
Gets or sets a value that indicates which pen tip to use when drawing ink that is associated with this DrawingAttributes object.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink (в Microsoft.Ink.dll)
Синтаксис
'Декларация
Public Property PenTip As PenTip
'Применение
Dim instance As DrawingAttributes
Dim value As PenTip
value = instance.PenTip
instance.PenTip = value
public PenTip PenTip { get; set; }
public:
property PenTip PenTip {
PenTip get ();
void set (PenTip value);
}
/** @property */
public PenTip get_PenTip()
/** @property */
public void set_PenTip(PenTip value)
public function get PenTip () : PenTip
public function set PenTip (value : PenTip)
Значение свойства
Тип: Microsoft.Ink.PenTip
Which pen tip to use when drawing ink that is associated with this DrawingAttributes object.
Value |
Meaning |
---|---|
Ball |
The pen renders as a round pen tip. |
Rectangle |
The pen renders as a rectangular pen tip. |
Заметки
For a complete list of pen tips available to use, see the PenTip enumeration.
To create a square pen tip, set the PenTip property to Rectangle. Then set the Width property equal to the Height property.
Примеры
This C# example creates event handlers for menu items that change the PenTip property of a DrawingAttributes object.
using Microsoft.Ink;
using Microsoft.Ink;
//...
private System.Windows.Forms.MenuItem menuInkPenTipBall;
private System.Windows.Forms.MenuItem menuInkPenTipRectangle;
private InkCollector theInkCollector;
private System.Windows.Forms.MenuItem checkedPenTip;
//...
private void menuInkPenTipBall_Click(
object sender, System.EventArgs e)
{
checkedPenTip.Checked = false;
theInkCollector.DefaultDrawingAttributes.PenTip = Microsoft.Ink.PenTip.Ball;
checkedPenTip = menuInkPenTipBall;
checkedPenTip.Checked = true;
Refresh();
}
private void menuInkPenTipRectangle_Click(
object sender, System.EventArgs e)
{
checkedPenTip.Checked = false;
theInkCollector.DefaultDrawingAttributes.PenTip = Microsoft.Ink.PenTip.Rectangle;
checkedPenTip = menuInkPenTipRectangle;
checkedPenTip.Checked = true;
Refresh();
}
This Microsoft® Visual Basic® .NET example creates event handlers for menu items that change the PenTip property of a DrawingAttributes object.
Imports Microsoft.Ink
'...
Dim MenuInkPenTipBall As System.Windows.Forms.MenuItem
Dim MenuInkPenTipRectangle As System.Windows.Forms.MenuItem
Dim CheckedPenTip As System.Windows.Forms.MenuItem
Dim theInkCollector As InkCollector
'...
Private Sub MenuInkPenTipBall_Click( _
ByVal sender As Object, ByVal e As System.EventArgs)
CheckedPenTip.Checked = False
theInkCollector.DefaultDrawingAttributes.PenTip = Microsoft.Ink.PenTip.Ball
CheckedPenTip = MenuInkPenTipBall
CheckedPenTip.Checked = True
Refresh()
End Sub
Private Sub MenuInkPenTipRectangle_Click( _
ByVal sender As Object, ByVal e As System.EventArgs)
CheckedPenTip.Checked = False
theInkCollector.DefaultDrawingAttributes.PenTip = Microsoft.Ink.PenTip.Rectangle
CheckedPenTip = MenuInkPenTipRectangle
CheckedPenTip.Checked = True
Refresh()
End Sub
Платформы
Windows Vista
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0