Condividi tramite


Classe ContextLinkCollection

Aggiornamento: novembre 2007

Contiene un insieme di oggetti ContextLink.

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

Sintassi

'Dichiarazione
Public Class ContextLinkCollection _
    Implements ICollection, IEnumerable
'Utilizzo
Dim instance As ContextLinkCollection
public class ContextLinkCollection : ICollection, 
    IEnumerable
public ref class ContextLinkCollection : ICollection, 
    IEnumerable
public class ContextLinkCollection implements ICollection, 
    IEnumerable
public class ContextLinkCollection implements ICollection, IEnumerable

Note

L'accesso viene di solito eseguito tramite la proprietà ContextNode.Links.

Esempi

Nell'esempio seguente vengono individuati tutti i nodi collegati al nodo ContextNode, selectedNode. Se selectedNode non è un nodo di destinazione, il nodo di destinazione viene aggiunto a un oggetto ArrayList, destinationNodes. Se selectedNode non è il nodo di origine, viene aggiunto a un oggetto ArrayList, sourceNodes.

Dim destinationNodes As ArrayList = New ArrayList()
Dim sourceNodes As ArrayList = New ArrayList()

' Find all the nodes that link to the currently selected node.
For Each link As Microsoft.Ink.ContextLink In selectedNode.Links
    If link.DestinationNode <> selectedNode Then
        destinationNodes.Add(link.DestinationNode)
    End If

    If link.SourceNode <> selectedNode Then
        sourceNodes.Add(link.SourceNode)
    End If
Next
ArrayList destinationNodes = new ArrayList();
ArrayList sourceNodes = new ArrayList();

// Find all the nodes that link to the currently selected node.
foreach (Microsoft.Ink.ContextLink link in selectedNode.Links)
{
    if (link.DestinationNode != selectedNode)
    {
        destinationNodes.Add(link.DestinationNode);
    }

    if (link.SourceNode != selectedNode)
    {
        sourceNodes.Add(link.SourceNode);
    }

}

Gerarchia di ereditarietà

System.Object
  Microsoft.Ink.ContextLinkCollection

Codice thread safe

Qualsiasi membro static (Shared in Visual Basic) pubblico di questo tipo è thread-safe. I membri di istanza non sono garantiti come thread-safe.

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

Membri ContextLinkCollection

Spazio dei nomi Microsoft.Ink

Microsoft.Ink.ContextLink

ContextNode.Links