SM
Scott Montgomerie
June 13, 2005 10:32 PM UTC
I have struggled with this for about a day now... I was trying to set event handlers on the MouseMove and MouseLeave events, but I kept getting a flickering in the icon, and it looked like I was fighting with the grid to set the Cursor. I discovered that it was trying to set the cursor to the MouseControllerDispatcher''s DisplayCursor, which was null. It turns out the proper way to fix this is to implement IMouseController:
internal class MouseControllerDescendant: IMouseController
{
}
my_grid.MouseControllerDispatcher.Add(new MouseControllerDescendant());
This class then implements a bunch of methods like HitTest, MouseHover, MouseEnter, etc., instead of using the usual event handlers.
Hope this helps somebody and saves them a day of frustration!
Cheers