本文整理匯總了VB.NET中System.Windows.Ink.StrokeCollection.ContainsPropertyData方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET StrokeCollection.ContainsPropertyData方法的具體用法?VB.NET StrokeCollection.ContainsPropertyData怎麽用?VB.NET StrokeCollection.ContainsPropertyData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Ink.StrokeCollection
的用法示例。
在下文中一共展示了StrokeCollection.ContainsPropertyData方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: Guid
Private timestamp As New Guid("12345678-9012-3456-7890-123456789012")
' Add a timestamp to the StrokeCollection.
Private Sub AddTimestamp_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
inkCanvas1.Strokes.AddPropertyData(timestamp, DateTime.Now)
End Sub
' Get the timestamp of the StrokeCollection.
Private Sub GetTimestamp_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
If inkCanvas1.Strokes.ContainsPropertyData(timestamp) Then
Dim savedDate As Object = inkCanvas1.Strokes.GetPropertyData(timestamp)
If TypeOf savedDate Is DateTime Then
MessageBox.Show("This StrokeCollection's timestamp is " & _
CType(savedDate, DateTime).ToString())
End If
Else
MessageBox.Show("The StrokeCollection does not have a timestamp.")
End If
End Sub