Sdílet prostřednictvím


ContextLink.LinkDirection Property

Gets the type of link that this ContextLink is set as.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)

Syntax

'Declaration
Public ReadOnly Property LinkDirection As ContextLinkDirection
'Usage
Dim instance As ContextLink 
Dim value As ContextLinkDirection 

value = instance.LinkDirection
public ContextLinkDirection LinkDirection { get; }
public:
property ContextLinkDirection LinkDirection {
    ContextLinkDirection get ();
}
public function get LinkDirection () : ContextLinkDirection

Property Value

Type: Microsoft.Ink.ContextLinkDirection
The type of link that this ContextLink is set as.

Examples

The following example finds all the nodes that are linked to the ContextNode node, selectedNode if the link direction is non-specfic.

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);
    }
}

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

ContextLink Class

ContextLink Members

Microsoft.Ink Namespace