Condividi tramite


Proprietà Stylus.Id

Aggiornamento: novembre 2007

Ottiene il GUID dell'oggetto Stylus.

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

Sintassi

'Dichiarazione
Public ReadOnly Property Id As Integer
'Utilizzo
Dim instance As Stylus
Dim value As Integer

value = instance.Id
public int Id { get; }
public:
property int Id {
    int get ();
}
/** @property */
public int get_Id()
public function get Id () : int

Valore proprietà

Tipo: System.Int32
GUID dell'oggetto Stylus.

Esempi

Questo esempio Microsoft Visual C# .NET è un frammento del metodo di supporto di un form, StylusDataToString. Il metodo di supporto accetta un oggetto Stylus e restituisce una stringa contenente informazioni sull'oggetto Stylus e sui relativi pulsanti.

using Microsoft.Ink;
using Microsoft.StylusInput;
using Microsoft.StylusInput.PluginData;

// ...

// Declare the RealTimeStylus objects, the GestureRecognizer plugin,
// and the DynamicRenderer plug-in.
private Microsoft.StylusInput.RealTimeStylus thePrimaryRealTimeStylus = null;
private Microsoft.StylusInput.RealTimeStylus theSecondaryRealTimeStylus = null;
private Microsoft.StylusInput.GestureRecognizer theGestureRecognizer = null;
private Microsoft.StylusInput.DynamicRenderer theDynamicRenderer = null;

// ...

// Returns information about a given stylus.
private string StylusDataToString(Stylus theStylus)
{
    System.Text.StringBuilder result = new System.Text.StringBuilder();

    // Add information about the tablet pen.
    result.Append(
        string.Format("  Name = {0}, Id = {1}, ContextId = {2}, Inverted = {3}, Button Count = {4}."
        + Environment.NewLine, theStylus.Name, theStylus.Id,
        theStylus.TabletContextId, theStylus.Inverted, theStylus.Buttons.Count));

    // Add information about each of the tabet pen's buttons.
    for (int i=0; i<theStylus.Buttons.Count; i++)
    {
        result.Append(
            string.Format("    Button {0}: Name = {1}, Id = {2}" + Environment.NewLine,
            i, theStylus.Buttons.GetName(i), theStylus.Buttons.GetId(i)));
    }

    return result.ToString();
}

Piattaforme

Windows Vista, Windows XP SP2, Windows Server 2003

.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

Stylus Classe

Membri Stylus

Spazio dei nomi Microsoft.StylusInput

StylusButtons

Microsoft.StylusInput.PluginData.StylusButtonDataBase

Microsoft.StylusInput.PluginData.StylusButtonDownData

Microsoft.StylusInput.PluginData.StylusButtonUpData