ContextNode.AddPropertyData Method
Adds a piece of application-specific data.
Namespace: System.Windows.Ink
Assembly: IAWinFX (in IAWinFX.dll)
Syntax
'Declaration
Public Sub AddPropertyData ( _
propertyDataId As Guid, _
propertyData As Object _
)
'Usage
Dim instance As ContextNode
Dim propertyDataId As Guid
Dim propertyData As Object
instance.AddPropertyData(propertyDataId, _
propertyData)
public void AddPropertyData(
Guid propertyDataId,
Object propertyData
)
public:
void AddPropertyData(
Guid propertyDataId,
Object^ propertyData
)
public function AddPropertyData(
propertyDataId : Guid,
propertyData : Object
)
Parameters
propertyDataId
Type: System.GuidA Guid used to identify the type of data.
propertyData
Type: System.ObjectThe data to add.
Remarks
The propertyDataId parameter can be any Guid (see PropertyGuidsForContextNodes).
Examples
This example puts a time stamp on each InkWordNode (inkWord) in an InkAnalyzer (theInkAnalyzer). The example checks the node for a time stamp. If the time stamp is not found, the example adds a property with a Guid named timeStampGuid.
Dim inkWords As ContextNodeCollection = theInkAnalyzer.FindNodesOfType(ContextNodeType.InkWord)
Dim inkWord As ContextNode
For Each inkWord In inkWords
If Not inkWord.ContainsPropertyData(Me.timeStampGuid) Then
inkWord.AddPropertyData(timeStampGuid, DateTime.Now)
End If
Next inkWord
ContextNodeCollection inkWords =
theInkAnalyzer.FindNodesOfType(ContextNodeType.InkWord);
foreach (ContextNode inkWord in inkWords)
{
if (!inkWord.ContainsPropertyData(this.timeStampGuid))
{
inkWord.AddPropertyData(timeStampGuid, DateTime.Now);
}
}
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
See Also
Reference
System.Windows.Ink.PropertyGuidsForAnalysisHints
System.Windows.Ink.PropertyGuidsForContextNodes
ContextNode.ContainsPropertyData
ContextNode.RemovePropertyData