forum

Home / DeveloperSection / Forums / WPF: Opacity and the MouseEnter Event.

WPF: Opacity and the MouseEnter Event.

Anonymous User 2255 15-Jul-2013
Hi Mindstick!

c# wpf mouseevent opacity

As part of a diagram, I am drawing a few overlapping Shapes, each with Opacity=0.5, like 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, some additional information should be displayed, but the event handler never gets called.

Is there a way to get MouseEnter events for all Shapes, instead of just the topmost one?


wpf wpf 
Updated on 15-Jul-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By