ContextNodeBase.AddPropertyData Method
Adds a piece of application-specific data.
Namespace: System.Windows.Ink.AnalysisCore
Assembly: IACore (in iacore.dll)
Syntax
'Declaration
Public Sub AddPropertyData ( _
propertyDataId As Guid, _
propertyData As Object _
)
'Usage
Dim instance As ContextNodeBase
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 void AddPropertyData (
Guid propertyDataId,
Object propertyData
)
public function AddPropertyData (
propertyDataId : Guid,
propertyData : Object
)
Not applicable.
Parameters
- propertyDataId
A Guid used to identify the type of data.
- propertyData
The data to add.
Remarks
The propertyDataId parameter can be any Guid (see PropertyGuidsForContextNodesBase).
Example
This example puts a time stamp on each ContextNodeBase that is a InkWord in an InkAnalyzerBase, theInkAnalyzerBase
. It adds a property with a Guid, timeStampGuid
, first checking to see if the node already contains a time stamp.
Dim inkWords As ContextNodeBaseCollection = _
theInkAnalyzerBase.FindNodesOfType(System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.InkWord)
Dim inkWord As ContextNodeBase
For Each inkWord In inkWords
If Not inkWord.ContainsPropertyData(Me.timeStampGuid) Then
inkWord.AddPropertyData(timeStampGuid, DateTime.Now)
End If
Next inkWord
System.Windows.Ink.AnalysisCore.ContextNodeBaseCollection inkWords =
theInkAnalyzerBase.FindNodesOfType(System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.InkWord);
foreach (ContextNodeBase inkWord in inkWords)
{
if (!inkWord.ContainsPropertyData(this.timeStampGuid))
{
inkWord.AddPropertyData(timeStampGuid, DateTime.Now);
}
}
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
ContextNodeBase Class
ContextNodeBase Members
System.Windows.Ink.AnalysisCore Namespace
System.Windows.Ink.AnalysisCore.PropertyGuidsForAnalysisHintsBase
System.Windows.Ink.AnalysisCore.PropertyGuidsForContextNodesBase
ContextNodeBase.ContainsPropertyData
ContextNodeBase.GetPropertyData
ContextNodeBase.RemovePropertyData
ContextNodeBase.SavePropertiesData
ContextNodeBase.LoadPropertiesData