StrokeCollection::AddPropertyData Method (Guid, Object^)
.NET Framework (current version)
Adds a custom property to the StrokeCollection.
Assembly: PresentationCore (in PresentationCore.dll)
Parameters
- propertyDataId
-
Type:
System::Guid
The Guid to associate with the custom property.
| Exception | Condition |
|---|---|
| ArgumentException | propertyDataId is an empty Guid. -or- propertyData is not one of the allowed data types listed in the Parameters section. |
The AddPropertyData method enables you to add custom properties to a StrokeCollection. You can then include extra information with a StrokeCollection.
The following example demonstrates how to add and get custom property data. The AddTimeStamp_Click method uses the AddPropertyData method to add the current time to the StrokeCollection. The GetTimeStap_Click method uses the GetPropertyData method to retrieve the timestamp from the StrokeCollection. This example assumes that there is an InkCanvas called inkCanvas1.
.NET Framework
Available since 3.0
Available since 3.0
Show: