I have a canvas object and I throw fantastic controls on it. I use a ScaleTransform object to scale the canvas to zoom in / out.
I hooked up the controls so that I can drag them, and the drag works well using MouseLeftButtonDown, MouseLeftButtonUp and MouseMove. Now I want to work on turning on an event when I click only on the canvas. When I read the docs for the canvas object, I see that the MouseLeftButtonDown event is fired only when it is above the UIElement.
Occurs when the left mouse button is pressed (or when the pen tip touches the tablet), while the mouse pointer is over a UIElement. (Inherited from UIElement.)
Unfortunately, I need the opposite behavior. I want to know when the mouse clicks on the canvas and the mouse pointer is not over any controls. Since I'm new to Silverlight, I might have done it wrong. Is there something I missed? Am I really wrong? I am looking for a little help and maybe a lot of directions.
source
share