次の方法で共有


ContextLinkCollection クラス

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