다음을 통해 공유


ContextLinkCollection 클래스

업데이트: 2007년 11월

ContextLink 개체 컬렉션을 포함합니다.

네임스페이스:  System.Windows.Ink
어셈블리:  IAWinFX(IAWinFX.dll)

구문

‘선언
Public Class ContextLinkCollection _
    Implements ICollection, IEnumerable
‘사용 방법
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

설명

ContextLinkCollection은 일반적으로 ContextNode.Links 속성을 통해 액세스됩니다.

예제

다음 예제에서는 선택된 노드에 링크된 모든 노드를 찾습니다. 찾은 노드가 소스 노드인 경우 예제에서는 연결된 노드 그룹을 sourceNodes라는 ArrayList에 넣습니다. 찾은 노드가 예제 노드인 경우 예제에서는 연결된 노드 그룹을 destinationNodes에 넣습니다.

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

' Find all the nodes that link to the currently selected node.
Dim link As ContextLink
For Each link 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 link
ArrayList destinationNodes = new ArrayList();
ArrayList sourceNodes = new ArrayList();

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

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

상속 계층 구조

System.Object
  System.Windows.Ink.ContextLinkCollection

스레드로부터의 안전성

이 형식의 모든 공용 static(Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

플랫폼

Windows Vista

.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

3.0에서 지원

참고 항목

참조

ContextLinkCollection 멤버

System.Windows.Ink 네임스페이스

System.Windows.Ink.ContextLink

ContextNode.Links