As part of the diagram, I draw several overlapping Shapes, each with Opacity=0.5, as here:
<Grid>
<Rectangle Fill="Blue" Opacity="0.5" MouseEnter="Rectangle_MouseEnter" />
<Rectangle Fill="Red" Opacity="0.5" />
</Grid>
private void Rectangle_MouseEnter(object sender, MouseEventArgs e)
{
MessageBox.Show("Entered");
}
When the user enters the shape with the mouse, it is necessary to display some additional information, but the event handler will never be called.
Is there a way to get MouseEnter events for all Shapes, not just the topmost?
source
share