Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Stroke.RemovePropertyData Method

Deletes a custom property from the Stroke object.

Namespace:  System.Windows.Ink
Assembly:  PresentationCore (in PresentationCore.dll)

public void RemovePropertyData(
	Guid propertyDataId
)

Parameters

propertyDataId
Type: System.Guid

The unique identifier for the property.

The following example demonstrates how to delete a custom property from a Stroke object.

// Create a guid for the date/timestamp.
Guid dateTimeGuid = new Guid("03457307-3475-3450-3035-045430534046");

DateTime current = DateTime.Now;

// Check whether the property is already saved 
if (thisStroke.ContainsPropertyData(dateTimeGuid))
{
    DateTime oldDateTime = (DateTime)thisStroke.GetPropertyData(dateTimeGuid);

    // Check whether the existing property matches the current date/timestamp 
    if (!(oldDateTime == current))
    {
        // Delete the custom property
        thisStroke.RemovePropertyData(dateTimeGuid);
    }
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft