Alternative to TokenMouseEnter

SyntaxEditor for WPF Forum

Posted 12 years ago by Kasper
Version: 12.1.0561

Hi guys,

In SyntaxEditor for WinForms, I use the TokenMouseEnter and TokenMouseLeave events to change the mouse cursor if it's currently over a specific type of token. I don't see events like that for the WPF version, so I wonder what's the best way of accomplishing the same is? I was thinking of just using the MouseMove event, but I fear that it will be to intensive to pull out the current token each time this event is fired? How did you accomplish this in the WinForms version? Please advice :)

Comments (1)

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Kasper,

In WPF, you'd probably just handle MouseMove as you thought and call the hit test features of SyntaxEditor.  In WinForms we used to cache the token that the hit testing found.  If it changed in one of the mouse moves, we'd raise the appropriate TokenMouseEnter/TokenMouseLeave events.

Actipro Software Support

The latest build of this product (v24.1.2) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.