wrote:After I fill the ellipse like this: myEllipse.Fill = new SolidColorBrush(Colors.Blue);
the test pass also when I click in the middle of the Ellipse.
How can I disable this ?
You could draw the fill with a second ellipse inside the first one. Otherwise, you can check the mouse position inside the ellipse and calculate if it's on the edge or the middle. You certainly cannot create an object, and tell it to lie to you if you ask if the mouse is over it.