本文整理汇总了VB.NET中System.Windows.Controls.InkCanvas.StrokesReplaced事件的典型用法代码示例。如果您正苦于以下问题:VB.NET InkCanvas.StrokesReplaced事件的具体用法?VB.NET InkCanvas.StrokesReplaced怎么用?VB.NET InkCanvas.StrokesReplaced使用的例子?那么, 这里精选的事件代码示例或许可以为您提供帮助。您也可以进一步了解该事件所在类System.Windows.Controls.InkCanvas
的用法示例。
在下文中一共展示了InkCanvas.StrokesReplaced事件的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: InitializePlayersCanvases
Private player1 As StrokeCollection
Private player2 As StrokeCollection
Sub InitializePlayersCanvases()
player1 = inkCanvas1.Strokes
player2 = New StrokeCollection()
End Sub
' Use a different "inking surface" for each player.
Private Sub switchPlayersButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
If StrokeCollection.ReferenceEquals(inkCanvas1.Strokes, player1) Then
inkCanvas1.Strokes = player2
Else
inkCanvas1.Strokes = player1
End If
End Sub
Private Sub inkCanvas1_StrokesReplaced(ByVal sender As Object, _
ByVal e As InkCanvasStrokesReplacedEventArgs)
If StrokeCollection.ReferenceEquals(e.NewStrokes, player1) Then
Title = "Player one's turn"
Else
Title = "Player two's turn"
End If
End Sub