Share via


Metodo InkAnalyzerBase.SetStrokesType

Aggiornamento: novembre 2007

Modifica il tipo dei tratti specificati.

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

Sintassi

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

instance.SetStrokesType(strokeIds, strokeType)
public void SetStrokesType(
    int[] strokeIds,
    StrokeType strokeType
)
public:
void SetStrokesType(
    array<int>^ strokeIds, 
    StrokeType strokeType
)
public void SetStrokesType(
    int[] strokeIds,
    StrokeType strokeType
)
public function SetStrokesType(
    strokeIds : int[], 
    strokeType : StrokeType
)

Parametri

  • strokeIds
    Tipo: array<System.Int32[]
    Matrice che contiene gli identificatori dei tratti ai quali 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 un tratto identificato in strokeIds non è associato all'analizzatore dell'input penna, questo metodo ignora l'identificatore.

Se nessuno dei tratti identificati in strokeIds identifica un tratto associato all'analizzatore dell'input penna, questo metodo restituisce un risultato senza aggiornare l'analizzatore dell'input penna.

Questo metodo genera un'eccezione System.ArgumentNullException quando strokeIds è nullriferimento null (Nothing in Visual Basic).

Esempi

Nell'esempio seguente viene impostato il tipo di tratto sul valore Writing di StrokeType e le impostazioni locali del tratto sulla lingua francese per tutti i tratti nel nodo specificato. L'oggetto InkAnalyzerBase, theInkAnalyzerBase, contiene l'oggetto ContextNodeBase, theNode specificato.

' For all strokes in the specified node or one of its descendants,
' set the stroke type to Writing and the stroke locale to French.
Dim theStrokeIds As Integer() = theNode.GetStrokeIds()
If 0 < theStrokeIds.Length Then
    theInkAnalyzerBase.SetStrokesType( _
        theStrokeIds, System.Windows.Ink.AnalysisCore.StrokeType.Writing)
    theInkAnalyzerBase.SetStrokesLanguageId(theStrokeIds, &H40C)
End If
// For all strokes in the specified node or one of its descendants,
// set the stroke type to Writing and the stroke locale to French.
int[] theStrokeIds = theNode.GetStrokeIds();
if (0 < theStrokeIds.Length)
{
    theInkAnalyzerBase.SetStrokesType(theStrokeIds,
        System.Windows.Ink.AnalysisCore.StrokeType.Writing);
    theInkAnalyzerBase.SetStrokesLanguageId(theStrokeIds, 0x040c);
}

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.SetStrokeType

System.Windows.Ink.AnalysisCore.StrokeType