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
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET