Freigeben über


ContextNode.AddPropertyData-Methode

Fügt anwendungsspezifische Daten hinzu.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.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 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 annehmen (siehe PropertyGuidsForContextNodes).

Beispiele

In diesem Beispiel erhält jeder InkWordNode in einem InkAnalyzer mit dem Namen theInkAnalyzer einen Zeitstempel. Fügt eine Eigenschaft mit einer Guid, timeStampGuid hinzu, nachdem überprüft wurde, ob der Knoten bereits einen Zeitstempel enthält.

Dim inkWords As ContextNodeCollection = _
    theInkAnalyzer.FindNodesOfType(Microsoft.Ink.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(Microsoft.Ink.ContextNodeType.InkWord);
            foreach (ContextNode inkWord in inkWords)
            {
                if (!inkWord.ContainsPropertyData(this.timeStampGuid))
                {
                    inkWord.AddPropertyData(timeStampGuid, DateTime.Now);
                }
            }

Plattformen

Windows Vista

.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

ContextNode-Klasse

ContextNode-Member

Microsoft.Ink-Namespace

Microsoft.Ink.PropertyGuidsForAnalysisHints

Microsoft.Ink.PropertyGuidsForContextNodes

ContextNode.ContainsPropertyData

ContextNode.GetPropertyData

ContextNode.RemovePropertyData

ContextNode.SavePropertiesData

ContextNode.LoadPropertiesData