共用方式為


ContextLink.SourceNode 屬性

取得 ContextNode 物件,這個物件是這個 ContextLink 物件的來源。

命名空間:  Microsoft.Ink
組件:  Microsoft.Ink.Analysis (在 Microsoft.Ink.Analysis.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

屬性值

型別:Microsoft.Ink.ContextNode
ContextNode 物件,其為這個 ContextLink 物件的來源。

範例

下列範例會尋找連結至名為 selectedNode 之 ContextNode 節點的所有節點。如果 selectedNode 不是目的節點,則會將目的節點加入至 ArrayList (英文) (變數名稱為 destinationNodes)。如果 selectedNode 不是來源節點,則會將來源節點加入至名為 sourceNodes 的 ArrayList (英文)。

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

}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

ContextLink 類別

ContextLink 成員

Microsoft.Ink 命名空間

ContextLink.DestinationNode