ContextNodeCollection.Add Method
Adds a ContextNode object to the ContextNodeCollection.
Namespace: System.Windows.Ink
Assembly: IAWinFX (in IAWinFX.dll)
Syntax
'Declaration
Public Function Add ( _
nodeToAdd As ContextNode _
) As Integer
'Usage
Dim instance As ContextNodeCollection
Dim nodeToAdd As ContextNode
Dim returnValue As Integer
returnValue = instance.Add(nodeToAdd)
public int Add(
ContextNode nodeToAdd
)
public:
int Add(
ContextNode^ nodeToAdd
)
public function Add(
nodeToAdd : ContextNode
) : int
Parameters
nodeToAdd
Type: System.Windows.Ink.ContextNodeThe ContextNode object that is added to the ContextNodeCollection.
Return Value
Type: System.Int32
Returns the index where ContextNode is added. If the node already exists in the collection, this method returns the index of the node in the collection.
If this method fails, it returns -1.
Examples
The following example creates a new ParagraphNode from an InkAnalyzer named theInkAnalyzer, and adds it to the ContextNodeCollection named nodes.
Dim paragraph As ContextNode = theInkAnalyzer.RootNode.CreateSubNode(ContextNodeType.Paragraph)
nodes.Add(paragraph)
ContextNode paragraph =
theInkAnalyzer.RootNode.CreateSubNode(ContextNodeType.Paragraph);
nodes.Add(paragraph);
Platforms
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
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