Stroke.ContainsPropertyData(Guid) 메서드

정의

개체에 지정된 사용자 지정 속성이 Stroke 포함되어 있는지 여부를 나타내는 값을 반환합니다.

public:
 bool ContainsPropertyData(Guid propertyDataId);
public bool ContainsPropertyData(Guid propertyDataId);
member this.ContainsPropertyData : Guid -> bool
Public Function ContainsPropertyData (propertyDataId As Guid) As Boolean

매개 변수

propertyDataId
Guid

속성의 고유 식별자입니다.

반품

사용자 지정 속성이 있으면 반환 true 하고, 그렇지 않으면 반환합니다 false.

예제

다음 예제에서는 개체에 사용자 지정 속성이 있는지 여부를 Stroke 확인하는 방법을 보여 줍니다.

// 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

적용 대상

추가 정보