다음을 통해 공유


ContextLink.SourceNode 속성

업데이트: 2007년 11월

현재 ContextLink 개체의 소스인 ContextNode 개체를 가져옵니다.

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

구문

‘선언
Public ReadOnly Property SourceNode As ContextNode
‘사용 방법
Dim instance As ContextLink
Dim value As ContextNode

value = instance.SourceNode
public ContextNode SourceNode { get; }
public:
property ContextNode^ SourceNode {
    ContextNode^ get ();
}
/** @property */
public ContextNode get_SourceNode()
public function get SourceNode () : ContextNode

속성 값

형식: System.Windows.Ink.ContextNode
ContextLink 개체의 소스인 ContextNode 개체입니다.

예제

다음 예제에서는 selectedNode라는 ContextNode에 링크된 모든 노드를 찾습니다. selectedNode가 대상 노드가 아닌 경우 이름이 destinationNodes인 ArrayList에 대상 노드가 추가됩니다. selectedNode가 소스 노드가 아닌 경우 이름이 sourceNodes인 ArrayList에 소스 노드가 추가됩니다.

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);
    }
}

플랫폼

Windows Vista

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

버전 정보

.NET Framework

3.0에서 지원

참고 항목

참조

ContextLink 클래스

ContextLink 멤버

System.Windows.Ink 네임스페이스

ContextLink.DestinationNode