Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I layer one control over another so that that bottom control receives mouse events?

CONTROL events mouse
0
Posted

How can I layer one control over another so that that bottom control receives mouse events?

0

• Option #1: If the top control does not need to handle mouse events, you can set its IsHitTestVisible property to False. In this case, the two controls do not have to directly descend from one another. • Option #2: If the top control needs to handle mouse events, make sure that the top control is a descendent of the bottom control in the visual control hierarchy (for example top control is a direct child of bottom control). Mouse events propagate down (tunnel) and then up (bubble) the visual control hierarchy, so you can handle any mouse event at any level that you desire. • Key concept: (see Routed Events Overview).

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123