Stroke.RemovePropertyData(Guid) Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Löscht eine benutzerdefinierte Eigenschaft aus dem Stroke-Objekt.
public:
void RemovePropertyData(Guid propertyDataId);
public void RemovePropertyData (Guid propertyDataId);
member this.RemovePropertyData : Guid -> unit
Public Sub RemovePropertyData (propertyDataId As Guid)
Parameter
- propertyDataId
- Guid
Der eindeutige Bezeichner für die Eigenschaft.
Beispiele
Im folgenden Beispiel wird veranschaulicht, wie eine benutzerdefinierte Eigenschaft aus einem Stroke -Objekt gelöscht wird.
// 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
Gilt für:
Weitere Informationen
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für