本文整理匯總了VB.NET中System.Windows.Input.StylusPlugIns.StylusPlugIn.OnStylusUp方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET StylusPlugIn.OnStylusUp方法的具體用法?VB.NET StylusPlugIn.OnStylusUp怎麽用?VB.NET StylusPlugIn.OnStylusUp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Input.StylusPlugIns.StylusPlugIn
的用法示例。
在下文中一共展示了StylusPlugIn.OnStylusUp方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: OnStylusUp
Protected Overrides Sub OnStylusUp(ByVal rawStylusInput As RawStylusInput)
' Run the base class before we modify the data
MyBase.OnStylusUp(rawStylusInput)
' Get the StylusPoints that have come in
Dim stylusPoints As StylusPointCollection = rawStylusInput.GetStylusPoints()
' Modify the (X,Y) data to move the points
' inside the acceptable input area, if necessary
Dim i As Integer
For i = 0 To stylusPoints.Count - 1
Dim sp As StylusPoint = stylusPoints(i)
If sp.X < 50 Then
sp.X = 50
End If
If sp.X > 250 Then
sp.X = 250
End If
If sp.Y < 50 Then
sp.Y = 50
End If
If sp.Y > 250 Then
sp.Y = 250
End If
stylusPoints(i) = sp
Next i
' Copy the modified StylusPoints back to the RawStylusInput.
rawStylusInput.SetStylusPoints(stylusPoints)
End Sub