1

I am developing tablet application where I want to handle StylusButtonDown/Up events to indicate erasing mode. I put those 2 methods into DataInterestMask in StylusHandler but the result is that those two methods are called event if I dont press the button on stylus! ButtonDown is called when I touch the screen and ButtonUp when I take it off (Note : ButtonDown /Up is of course also called when the button on stylus is pressed.) This what I did not expect after reading this: http://msdn.microsoft.com/en-us/library/bb337400 Any ideas how couls this happen?

kizu
  • 42,604
  • 4
  • 68
  • 95
rank1
  • 1,018
  • 4
  • 16
  • 37
  • Can you show exactly, how are you adding your handler? – JleruOHeP Aug 28 '12 at 08:18
  • public DataInterestMask DataInterest { get { return DataInterestMask.StylusDown | DataInterestMask.Packets | DataInterestMask.StylusUp | DataInterestMask.StylusInRange | DataInterestMask.StylusOutOfRange | DataInterestMask.StylusButtonDown | DataInterestMask.StylusButtonUp | DataInterestMask.InAirPackets; } } – rank1 Aug 28 '12 at 12:53
  • Your DataInterestMask is not so interesting. Can you show, how you add your handlers for event? – JleruOHeP Aug 28 '12 at 13:20
  • There is just a class StylusHandler : IStylusAsyncPlugin, IStylusSyncPlugin, IDisposable. That has this DataInterestMask field and definition of these methods. AFAIK this is all that is necessary to handle events. You didn't mean the body of handlers? – rank1 Aug 28 '12 at 13:30
  • Welcome to StackOverflow! Please see ["Should questions include “tags” in their titles?"](http://meta.stackexchange.com/questions/19190/should-questions-include-tags-in-their-titles), where the consensus is "no, they should not". –  Nov 20 '14 at 12:44

0 Answers0