Condividi tramite


Metodo InkDrawingNode.SetShapeName

Aggiornamento: novembre 2007

Aggiunge un nuovo nome della forma definito dall'utente per l'oggetto InkDrawingNode.

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

Sintassi

'Dichiarazione
Public Sub SetShapeName ( _
    newShapeName As String _
)
'Utilizzo
Dim instance As InkDrawingNode
Dim newShapeName As String

instance.SetShapeName(newShapeName)
public void SetShapeName(
    string newShapeName
)
public:
void SetShapeName(
    String^ newShapeName
)
public void SetShapeName(
    String newShapeName
)
public function SetShapeName(
    newShapeName : String
)

Parametri

Note

Dopo aver impostato un nuovo nome della forma, tale stringa viene visualizzata come un oggetto AnalysisAlternate per l'oggetto InkDrawingNode. L'impostazione di più stringhe crea diverse alternative.

Esempi

Nell'esempio seguente vengono cercati tutti gli oggetti InkDrawingNode in un oggetto InkAnalyzer, theInkAnalyzer e viene impostato il nome della forma "Dot" su quelli i cui oggetti Strokes dispongono di limiti inferiori a 200 unità dell'input penna.

' Look for all InkDrawing nodes that are very small
Dim inkDrawingNodes As ContextNodeCollection = _
    theInkAnalyzer.FindNodesOfType(Microsoft.Ink.ContextNodeType.InkDrawing)
Dim inkDrawing As InkDrawingNode
For Each inkDrawing In inkDrawingNodes
    ' Check bounding box for size
    Dim bounds As Rectangle = inkDrawing.Strokes.GetBoundingBox()
    If bounds.Width < 200 And bounds.Height < 200 Then
        ' Set shape name
        inkDrawing.SetShapeName("Dot")
    End If
Next inkDrawing
// Look for all InkDrawing nodes that are very small
ContextNodeCollection inkDrawingNodes =
    theInkAnalyzer.FindNodesOfType(Microsoft.Ink.ContextNodeType.InkDrawing);
foreach (InkDrawingNode inkDrawing in inkDrawingNodes)
{
    // Check bounding box for size
    Rectangle bounds = inkDrawing.Strokes.GetBoundingBox();
    if (bounds.Width < 200 && bounds.Height < 200)
    {
        // Set shape name
        inkDrawing.SetShapeName("Dot");
    }
}

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

InkDrawingNode Classe

Membri InkDrawingNode

Spazio dei nomi Microsoft.Ink