I would like to know how to make an invisible hit area in silverlight. I have created a UIelement leftmousebuttondown event that calls a planeprojectionfunction(this function rotates the UIelment on its X-axis). However as the element is rotated there is less surface area for the mouse to click on. Any ideas?
+2
A:
Use a canvas and set the opacity to 1%. It will increase CPU usage a little bit (usually not noticeable) but that's a quick and easy approach.
EDIT:
As KeithMahoney pointed out, don't forget to set the background to a brush with some color. Canvas by default does not have a background brush.
Codism
2009-11-22 03:52:52
This will work as long as the Canvas has a Background brush set. If you set Background to "Transparent", then you don't even have to set the Opacity.
KeithMahoney
2009-11-23 18:13:19