tags:

views:

12

answers:

1

Hi all, I have a Silverlight 3 application the inside of whose grid layout root looks something like this:

<!-- other controls go here -->
<Canvas Canvas.ZIndex="10000" MouseMove="MoveCursor" Background="#00000000">
  <Image Source="badcursor.jpg" x:Name="CustomCursor"/>
</Canvas>
<!-- some more other controls -->

The canvas is intended to cover everything else on the page, yet be invisible, in order for me to use the custom cursor badcursor.jpg. However, now when I click anywhere on the page, MouseLeftButtonDown is not being fired on any other controls, I assume because it is being handled by the Canvas instead due to its Z-Index being higher than anything else (which is necessary in order for my cursor to show up!)

Does anyone know of a way to get the controls underneath the canvas to see the event, or have a better way of doing what I'm trying to do?

+2  A: 

Solved it by setting IsHitTestVisible to false on the canvas and image.

Brennan Vincent