Consider performing a HitTest to accurately determine when the mouse enters your Canvas bounds
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
MouseMove += OnMouseMove;
}
private void OnMouseMove(object sender, MouseEventArgs e)
{
// Retrieve the coordinate of the mouse position.
Point point = e.GetPosition((UIElement)sender);
// Perform the hit test against a given portion of the visual object tree.
HitTestResult hittestresult = VisualTreeHelper.HitTest(CanvasControl, point);
if (hittestresult != null)
{
// Perform action on hit visual object.
}
}
}
Take the time and read this fantastic document which details how to HitTest the Visual layer