Stroke.ContainsPropertyData(Guid) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Devolve um valor que indica se o Stroke objeto contém a propriedade personalizada especificada.
public:
bool ContainsPropertyData(Guid propertyDataId);
public bool ContainsPropertyData(Guid propertyDataId);
member this.ContainsPropertyData : Guid -> bool
Public Function ContainsPropertyData (propertyDataId As Guid) As Boolean
Parâmetros
- propertyDataId
- Guid
O identificador único da propriedade.
Devoluções
Devolve true se a propriedade personalizada existir; caso contrário, devolve false.
Exemplos
O exemplo seguinte demonstra como determinar se um Stroke objeto tem uma propriedade personalizada.
// 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