Skip to content

Have a control trigger PointerEnter while holding down left click #5677

Answered by kekekeks
EncryptedData asked this question in Q&A
Discussion options

You must be logged in to vote
  1. PointerEnter/PointerLeave won't work for touch input
  2. We are aware that the current behavior is against the pointer-events spec, but enter/leave won't work for touch input even when we implement it

For now I'd suggest to add

var root = (TopLevel)((IVisual)args.Source).GetVisualRoot();
var rootCoordinates = args.GetPosition(root);
var hitTestResult = root.Renderer.HitTest(rootCoordinates, root, null);

to your PointerMoved event handler to get the list of elements below the pointer and update their classes accordingly.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@EncryptedData
Comment options

@EncryptedData
Comment options

@kekekeks
Comment options

Answer selected by EncryptedData
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants