Private Sub ChangeCursor(ByVal target As FrameworkElement, ByVal cursor As Cursor)
target.Dispatcher.Invoke(DispatcherPriority.Normal,
New DispatcherOperationCallback( _
Function()
Mouse.OverrideCursor = cursor
Return Nothing
End Function),
Nothing)
End Sub
and
Private Sub ChangeCursor(ByVal target As FrameworkElement, ByRef cursor As Cursor)
target.Dispatcher.Invoke(DispatcherPriority.Normal,
New DispatcherOperationCallback( _
Function(cursor1 as Cursor)
Mouse.OverrideCursor = cursor1
Return Nothing
End Function),
cursor)
End Sub