次の方法で共有


ContextNodeBase.Links プロパティ

他の ContextNodeBase オブジェクト間の関係を表す ContextLinkBase オブジェクトのコレクションを取得します。

名前空間 :  System.Windows.Ink.AnalysisCore
アセンブリ :  IACore (IACore.dll 内)

構文

'宣言
Public ReadOnly Property Links As ContextLinkBaseCollection
'使用
Dim instance As ContextNodeBase
Dim value As ContextLinkBaseCollection

value = instance.Links
public ContextLinkBaseCollection Links { get; }
public:
property ContextLinkBaseCollection^ Links {
    ContextLinkBaseCollection^ get ();
}
/** @property */
public ContextLinkBaseCollection get_Links()
public function get Links () : ContextLinkBaseCollection

プロパティ値

型 : System.Windows.Ink.AnalysisCore.ContextLinkBaseCollection
他の ContextNodeBase オブジェクト間の関係を表す ContextLinkBase オブジェクトのコレクション。

解説

リンクにより示されている関係の種類の詳細については、ContextLinkBase クラスを参照してください。

次の例では、selectedNode という名前の ContextNodeBase ノードにリンクされているすべてのノードを検索します。selectedNode がリンク先ノードでない場合、リンク先ノードが destinationNodes という名前の ArrayList に追加されます。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, Windows XP SP2, Windows Server 2003

.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 3.0

参照

参照

ContextNodeBase クラス

ContextNodeBase メンバ

System.Windows.Ink.AnalysisCore 名前空間

System.Windows.Ink.AnalysisCore.ContextLinkBase