ContextLink.DestinationNode 属性

获取作为当前 ContextLink 对象的目标的 ContextNode 对象。

命名空间:  System.Windows.Ink
程序集:  IAWinFX(在 IAWinFX.dll 中)

语法

声明
Public ReadOnly Property DestinationNode As ContextNode
用法
Dim instance As ContextLink
Dim value As ContextNode

value = instance.DestinationNode
public ContextNode DestinationNode { get; }
public:
property ContextNode^ DestinationNode {
    ContextNode^ get ();
}
/** @property */
public ContextNode get_DestinationNode()
public function get DestinationNode () : 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.SourceNode