Stroke.RemovePropertyData(Guid) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Deletes a custom property from the Stroke object.
public:
void RemovePropertyData(Guid propertyDataId);
public void RemovePropertyData (Guid propertyDataId);
member this.RemovePropertyData : Guid -> unit
Public Sub RemovePropertyData (propertyDataId As Guid)
Parameters
- propertyDataId
- Guid
The unique identifier for the property.
Examples
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);
}
}
' Create a guid for the date/timestamp.
Dim dateTimeGuid As New Guid("03457307-3475-3450-3035-045430534046")
Dim current As DateTime = DateTime.Now
' Check whether the property is already saved
If thisStroke.ContainsPropertyData(dateTimeGuid) Then
Dim oldDateTime As DateTime = CType(thisStroke.GetPropertyData(dateTimeGuid), DateTime)
' Check whether the existing property matches the current date/timestamp
If Not oldDateTime = current Then
' Delete the custom property
thisStroke.RemovePropertyData(dateTimeGuid)
End If
End If
Applies to
See also
Tee yhteistyötä kanssamme GitHubissa
Tämän sisällön lähde on GitHubissa, jossa voit myös luoda ja tarkastella ongelmia ja pull-pyyntöjä. Katso lisätietoja osallistujan oppaasta.