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 int Add (
ContextNode nodeToAdd
)
public function Add (
nodeToAdd : ContextNode
) : int
Not applicable.
Parameters
- nodeToAdd
The ContextNode object to add to the ContextNodeCollection.
Return Value
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.
Example
The following example creates a new ParagraphNode from an InkAnalyzer, theInkAnalyzer
, and adds it to the ContextNodeCollection, 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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Framework
Supported in: 3.0
See Also
Reference
ContextNodeCollection Class
ContextNodeCollection Members
System.Windows.Ink Namespace
Reparent