Stroke.GetPropertyData(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.
Retrieves the property data for the specified GUID.
public:
System::Object ^ GetPropertyData(Guid propertyDataId);
public object GetPropertyData (Guid propertyDataId);
member this.GetPropertyData : Guid -> obj
Public Function GetPropertyData (propertyDataId As Guid) As Object
Parameters
- propertyDataId
- Guid
The unique identifier for the property.
Returns
An object
containing the property data.
Exceptions
propertyDataId
is not associated with a custom property of the Stroke.
Examples
The following example demonstrates how to retrieve a custom property on a Stroke object.
// Create a guid for the date/timestamp.
Guid dtGuid = new Guid("03457307-3475-3450-3035-640435034540");
DateTime now = DateTime.Now;
// Check whether the property is already saved
if (thisStroke.ContainsPropertyData(dtGuid))
{
// Check whether the existing property matches the current date/timestamp
DateTime oldDT = (DateTime)thisStroke.GetPropertyData(dtGuid);
if (oldDT != now)
{
// Update the current date and time
thisStroke.AddPropertyData(dtGuid, now);
}
}
' Create a guid for the date/timestamp.
Dim dtGuid As New Guid("03457307-3475-3450-3035-640435034540")
Dim now As DateTime = DateTime.Now
' Check whether the property is already saved
If thisStroke.ContainsPropertyData(dtGuid) Then
' Check whether the existing property matches the current date/timestamp
Dim oldDT As DateTime = CType(thisStroke.GetPropertyData(dtGuid), DateTime)
If oldDT <> now Then
' Update the current date and time
thisStroke.AddPropertyData(dtGuid, now)
End If
End If
Applies to
See also
Vertu í samstarfi við okkur á GitHub
Heimildina fyrir þetta efni er að finna á GitHub, þar sem þú getur líka búið til og farið yfir vandamál og sameinað beiðnir. Frekari upplýsingar er að finna í framlagshandbók okkar.
Athugasemdir
https://aka.ms/ContentUserFeedback.
Væntanlegt: Á árinu 2024 munum við hætta með GitHub-mál sem ábendingaleið fyrir efni og skipta því út fyrir nýtt ábendingakerfi. Frekari upplýsingar er að finna hér:Senda inn og skoða endurgjöf fyrir