Share via


Metodo InkAnalyzerBase.SetStrokeType

Aggiornamento: novembre 2007

Modifica il tipo del tratto specificato.

Spazio dei nomi:  System.Windows.Ink.AnalysisCore
Assembly:  IACore (in IACore.dll)

Sintassi

'Dichiarazione
Public Sub SetStrokeType ( _
    strokeId As Integer, _
    strokeType As StrokeType _
)
'Utilizzo
Dim instance As InkAnalyzerBase
Dim strokeId As Integer
Dim strokeType As StrokeType

instance.SetStrokeType(strokeId, strokeType)
public void SetStrokeType(
    int strokeId,
    StrokeType strokeType
)
public:
void SetStrokeType(
    int strokeId, 
    StrokeType strokeType
)
public void SetStrokeType(
    int strokeId,
    StrokeType strokeType
)
public function SetStrokeType(
    strokeId : int, 
    strokeType : StrokeType
)

Parametri

  • strokeId
    Tipo: System.Int32
    Identificatore del tratto al quale assegnare strokeType.

Note

Se il tipo di un tratto è costituito dal valore StrokeType di Unspecified, l'analizzatore dell'input penna classifica il tratto durante l'analisi dell'input penna. In caso contrario, l'analizzatore dell'input penna utilizza il tipo impostato sul tratto.

L'analizzatore dell'input penna non imposta il valore del tipo di tratto come parte dell'analisi dell'input penna. Per ottenere il tipo attualmente assegnato a un tratto, chiamare GetStrokeType.

Se un tratto è associato a un nodo di contesto che non è un nodo dell'input penna non classificato, questo metodo sposta il tratto in un nodo dell'input penna non classificato che contiene tratti della stessa lingua. Se non esiste nessun nodo di contesto simile, questo metodo crea un nuovo nodo dell'input penna non classificato e aggiunge il tratto ad esso. Un nodo dell'input penna non classificato è un oggetto ContextNodeBase che dispone di un valore della proprietà Type di UnclassifiedInk.

Se questo metodo sposta un tratto, il metodo aggiunge anche il riquadro del tratto alla proprietà DirtyRegion dell'analizzatore dell'input penna.

Questo metodo non sposta un tratto se il parametro strokeType corrisponde al tipo corrente del tratto.

Se il tratto specificato non è associato all'analizzatore dell'input penna, questo metodo restituisce un risultato senza aggiornare l'analizzatore dell'input penna.

Esempi

Nell'esempio seguente viene controllato il tipo di tratto specificato e, se non è già impostato su Unspecified, viene impostato su Unspecified. L'oggetto InkAnalyzerBase, theInkAnalyzerBase, contiene i dati del tratto per l'identificatore di tratto, theStrokeId.

' If the specified stroke is not set to unspecified,
' Set the stroke's type to unspecified.
Dim theStrokeType As System.Windows.Ink.AnalysisCore.StrokeType = _
    theInkAnalyzerBase.GetStrokeType(theStrokeId)
If System.Windows.Ink.AnalysisCore.StrokeType.Unspecified <> theStrokeType Then
    theInkAnalyzerBase.SetStrokeType( _
        theStrokeId, System.Windows.Ink.AnalysisCore.StrokeType.Unspecified)
End If
// If the specified stroke is not set to unspecified,
// Set the stroke's type to unspecified.
System.Windows.Ink.AnalysisCore.StrokeType theStrokeType =
    theInkAnalyzerBase.GetStrokeType(theStrokeId);
if (System.Windows.Ink.AnalysisCore.StrokeType.Unspecified != theStrokeType)
{
    theInkAnalyzerBase.SetStrokeType(theStrokeId,
        System.Windows.Ink.AnalysisCore.StrokeType.Unspecified);
}

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

InkAnalyzerBase Classe

Membri InkAnalyzerBase

Spazio dei nomi System.Windows.Ink.AnalysisCore

InkAnalyzerBase.GetStrokeType

InkAnalyzerBase.SetStrokesType

System.Windows.Ink.AnalysisCore.StrokeType