Reputation: 11
I added some polylines on a canvas and registered an event handler for zoom on this canvas, but zooming only works when the mouse is exactly over the polyline. How can I make zooming work when the mouse is somewhere else on the canvas?
Upvotes: 1
Views: 647
Reputation: 1444
To pick up events a Canvas must have:
Some events may also require that the Handled property of the event args be set to false to allow the event to cascade from the object you clicked (the Polyline in this case) to the Canvas itself. Doesn't sound like you're having that problem, but I mention it in case it becomes an issue later.
Upvotes: 1
Reputation: 70122
Have you set a background on your Canvas? Mouse events are generally only picked up on elements that have a background.
Upvotes: 2