Condividi tramite


Proprietà ContextNode.Strokes

Aggiornamento: novembre 2007

Ottiene l'oggetto Strokes associato all'oggetto ContextNode.

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

Sintassi

'Dichiarazione
Public ReadOnly Property Strokes As Strokes
'Utilizzo
Dim instance As ContextNode
Dim value As Strokes

value = instance.Strokes
public Strokes Strokes { get; }
public:
property Strokes^ Strokes {
    Strokes^ get ();
}
/** @property */
public Strokes get_Strokes()
public function get Strokes () : Strokes

Valore proprietà

Tipo: Microsoft.Ink.Strokes
Oggetto Strokes associato all'oggetto ContextNode.

Note

Se ContextNode non è un nodo foglia, la proprietà restituisce i tratti di tutti i discendenti foglia.

Se il tipo di nodo non include i tratti, ad esempio TextWordNode, ImageNode o AnalysisHintNode, questa proprietà restituisce un insieme di tratti vuoto.

Esempi

In questo esempio viene utilizzato un metodo che assegna DrawingAttributes rossi ai tratti di un oggetto ContextNode e assegna gli attributi di disegno predefiniti a tutti gli altri tratti. Un oggetto InkCollector, theInkCollector, associato a un Panel, theNotePanel, ha raccolto i tratti.

Private Sub MarkNodeAsRed(ByVal selectedNode As ContextNode)
    ' Set all node strokes to black, but this one to red
    Dim inkStroke As Stroke
    For Each inkStroke In Me.theInkCollector.Ink.Strokes
        If Not (selectedNode Is Nothing) AndAlso _
           selectedNode.Strokes.Contains(inkStroke) Then
            inkStroke.DrawingAttributes = New DrawingAttributes(Color.Red)
        Else
            inkStroke.DrawingAttributes = Me.theInkCollector.DefaultDrawingAttributes
        End If
    Next inkStroke
    theNotesPanel.Refresh()

End Sub 'MarkNodeAsRed

        private void MarkNodeAsRed(ContextNode selectedNode)
        {
            // Set all node strokes to black, but this one to red
            foreach (Stroke stroke in this.theInkCollector.Ink.Strokes)
            {
                if (selectedNode != null && 
                    selectedNode.Strokes.Contains(stroke))
                    stroke.DrawingAttributes = new DrawingAttributes(Color.Red);
                else
                    stroke.DrawingAttributes = this.theInkCollector.DefaultDrawingAttributes;
            }

            theNotesPanel.Refresh();
        }

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

ContextNode Classe

Membri ContextNode

Spazio dei nomi Microsoft.Ink

Microsoft.Ink.Strokes