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 設定的連結類型。
範例
下列範例會在沒有特定連結方向的情況下,尋找連結至名為 selectedNode 之 ContextNode 節點的所有節點。
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