Condividi tramite


Proprietà DrawingAttributes.PenTip

Aggiornamento: novembre 2007

Ottiene o imposta un valore che indica la punta della penna da utilizzare per disegnare l'input penna associato a questo oggetto DrawingAttributes.

Spazio dei nomi:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Sintassi

'Dichiarazione
Public Property PenTip As PenTip
'Utilizzo
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)

Valore proprietà

Tipo: Microsoft.Ink.PenTip
Punta della penna da utilizzare per disegnare l'input penna associato a questo oggetto DrawingAttributes.

Valore

Significato

Ball

Sottoposta a rendering, la penna presenta una punta rotonda.

Rectangle

Sottoposta a rendering, la penna presenta una punta rettangolare.

Note

Per un elenco completo delle punte delle penne disponibili, vedere l'enumerazione PenTip.

Per creare una punta della penna quadrata, impostare la proprietà PenTip su Rectangle. Impostare quindi la proprietà Width sullo stesso valore della proprietà Height.

Esempi

In questo esempio C# vengono creati gestori di eventi per le voci di menu che modificano la proprietà PenTip di un oggetto DrawingAttributes.

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();
    }

In questo esempio Microsoft® Visual Basic® .NET vengono creati gestori di eventi per le voci di menu che modificano la proprietà PenTip di un oggetto DrawingAttributes.

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

Piattaforme

Windows Vista

.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.

Informazioni sulla versione

.NET Framework

Supportato in: 3.0

Vedere anche

Riferimenti

DrawingAttributes Classe

Membri DrawingAttributes

Spazio dei nomi Microsoft.Ink

DrawingAttributes.Height

DrawingAttributes.Width