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
)
You cannot use methods in XAML.

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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft