Freigeben über


ContextNodeBase.AddPropertyData-Methode

Fügt anwendungsspezifische Daten hinzu.

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
)

Parameter

  • propertyDataId
    Typ: System.Guid
    Eine Guid, die zum Identifizieren des Datentyps verwendet wird.

Hinweise

Der propertyDataId-Parameter kann jede beliebige Guid sein (siehe PropertyGuidsForContextNodesBase).

Beispiele

In diesem Beispiel wird jede ContextNodeBase, der ein InkWord in einem InkAnalyzerBase mit dem Namen theInkAnalyzerBase ist, mit einem Zeitstempel versehen. Fügt eine Eigenschaft mit einer Guid, timeStampGuid hinzu, nachdem überprüft wurde, ob der Knoten bereits einen Zeitstempel enthält.

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);
    }
}

Plattformen

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework und .NET Compact Framework unterstützen nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET Framework.

Versionsinformationen

.NET Framework

Unterstützt in: 3.0

Siehe auch

Referenz

ContextNodeBase-Klasse

ContextNodeBase-Member

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