ContextLink.LinkDirection 属性
获取对此 ContextLink 设置的链接类型。
命名空间: Microsoft.Ink
程序集: Microsoft.Ink.Analysis(在 Microsoft.Ink.Analysis.dll 中)
语法
声明
Public ReadOnly Property LinkDirection As ContextLinkDirection
用法
Dim instance As ContextLink
Dim value As ContextLinkDirection
value = instance.LinkDirection
public ContextLinkDirection LinkDirection { get; }
public:
property ContextLinkDirection LinkDirection {
ContextLinkDirection get ();
}
/** @property */
public ContextLinkDirection get_LinkDirection()
public function get LinkDirection () : ContextLinkDirection
属性值
类型:Microsoft.Ink.ContextLinkDirection
将此 ContextLink 设置为的链接类型。
示例
下面的示例查找以非特定方向链接到 ContextNode 节点 selectedNode 的所有节点。
Dim nonSpecificDirectionNodes As ArrayList = New ArrayList()
' Find all the nodes that link to the currently selected node
' in a non specific direction (ContextLinkDirection.LinksWith)
For Each link As Microsoft.Ink.ContextLink In selectedNode.Links
If link.DestinationNode <> selectedNode And _
ContextLinkDirection.LinksWith = link.LinkDirection Then
nonSpecificDirectionNodes.Add(link.DestinationNode)
End If
If link.SourceNode <> selectedNode And _
ContextLinkDirection.LinksWith = link.LinkDirection Then
nonSpecificDirectionNodes.Add(link.DestinationNode)
End If
Next
ArrayList nonSpecificDirectionNodes = new ArrayList();
// Find all the nodes that link to the currently selected node
// in a non specific direction (ContextLinkDirection.LinksWith)
foreach (Microsoft.Ink.ContextLink link in selectedNode.Links)
{
if (link.DestinationNode != selectedNode &&
ContextLinkDirection.LinksWith == link.LinkDirection)
{
nonSpecificDirectionNodes.Add(link.DestinationNode);
}
if (link.SourceNode != selectedNode &&
ContextLinkDirection.LinksWith == link.LinkDirection)
{
nonSpecificDirectionNodes.Add(link.DestinationNode);
}
}
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.0