Skip to main content
Home Forums Silverlight Programming Report a Silverlight Bug Empty Canvas & Grid control does not fire LeftMouseButtonDown & Up event
2 replies. Latest Post by StefanWick on December 22, 2008.
(0)
Galo
Member
39 points
72 Posts
12-22-2008 10:38 AM |
as stated, unless you manualy set the background property to any color except Transparent, it works, otherwhise it does not work!
Keep up the good work fellaz...
bryant
Star
9907 points
1,629 Posts
12-22-2008 11:47 AM |
It doesn't capture the mouse down because there is nothing visually there. You could try setting IsHitTestVisible to true, but I'm not sure that will do anything. Another trick is to set the background to a color but opacity to 0.01.
StefanWick
Contributor
2864 points
438 Posts
12-22-2008 3:34 PM |
Setting Background="Transparent" on the Canvas should do it (I just verified it). Note that this is different from not setting the background (i.e. Background == null), from a hit-testing perspective.
Thanks, Stefan Wick