Partager via


Ink.ExtendedProperties Property

Ink.ExtendedProperties Property

Gets the collection of application-defined data.

Definition

Visual Basic .NET Public ReadOnly Property ExtendedProperties As ExtendedProperties
C# public ExtendedProperties ExtendedProperties { get; }
Managed C++ public: __property ExtendedProperties* get_ExtendedProperties();

Property Value

Microsoft.Ink.ExtendedProperties. The collection of application-defined data.

This property is read-only. This property has no default value.

Exceptions

ObjectDisposedException Leave Site: The Ink object is disposed.

Remarks

Applications can use the ExtendedProperties property to access the custom data that is stored in the Ink object. This custom data is automatically serialized with the object.

Examples

[C#]

This C# example adds an ExtendedProperties property to an Ink object, theInk. The ExtendedProperties property conatins the time stamp for when the Ink object is saved, referenced by a Guid Leave Site, theTimeGuid.

// ...
// Saving
theInk.ExtendedProperties.Add(theTimeGuid, DateTime.Now);
byte[] inkData = theInk.Save();

// ...
// Loading
Ink newInk = new Ink();
newInk.Load(inkData);
DateTime whenSaved = (DateTime) newInk.ExtendedProperties[theTimeGuid].Data;
                

[VB.NET]

This Microsoft® Visual Basic® .NET example adds an ExtendedProperties property to an Ink object, theInk. The ExtendedProperties property conatins the time stamp for when the Ink object is saved, referenced by a Guid Leave Site, theTimeGuid.

'...
'Saving
theInk.ExtendedProperties.Add(theTimeGuid, DateTime.Now)
Dim inkData As Byte() = theInk.Save()

'...
'Loading
Dim newInk As New Ink()
newInk.Load(inkData)
Dim whenSaved As DateTime = _
    newInk.ExtendedProperties(theTimeGuid).Data
            

See Also