ContextLinkCollection.Add 方法

将一个新 ContextLink 对象添加到 ContextLinkCollection,以指示目标节点及其方向。

命名空间:  Microsoft.Ink
程序集:  Microsoft.Ink.Analysis(在 Microsoft.Ink.Analysis.dll 中)

语法

声明
Public Function Add ( _
    destinationNode As ContextNode, _
    linkDirection As ContextLinkDirection _
) As ContextLink
用法
Dim instance As ContextLinkCollection
Dim destinationNode As ContextNode
Dim linkDirection As ContextLinkDirection
Dim returnValue As ContextLink

returnValue = instance.Add(destinationNode, _
    linkDirection)
public ContextLink Add(
    ContextNode destinationNode,
    ContextLinkDirection linkDirection
)
public:
ContextLink^ Add(
    ContextNode^ destinationNode, 
    ContextLinkDirection linkDirection
)
public ContextLink Add(
    ContextNode destinationNode,
    ContextLinkDirection linkDirection
)
public function Add(
    destinationNode : ContextNode, 
    linkDirection : ContextLinkDirection
) : ContextLink

参数

返回值

类型:Microsoft.Ink.ContextLink
新的 ContextLink 对象。

备注

此集合关联的 ContextNode 会成为新 ContextLink 对象中的 SourceNode

ContextLink 对象也会添加到 DestinationNode 对象的 Links 属性。

示例

下面的示例在一个 InkDrawingNode 对象 drawing 与一个 InkWordNode 对象 word 之间添加链接。

drawing.Links.Add(word, Microsoft.Ink.ContextLinkDirection.LinksWith)
drawing.Links.Add(word, Microsoft.Ink.ContextLinkDirection.LinksWith);

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

ContextLinkCollection 类

ContextLinkCollection 成员

Microsoft.Ink 命名空间