Wpf hint not shown on usercontrol or its children

I have a canvas with user controls located on it. When a tooltip is assigned to a usercontrol or to one of its children, this tooltip is not displayed (an open event also fails). I cannot explicitly disable them.

I placed a lot of tooltips elsewhere in the application, and all of them are displayed, except for those that I created for usercontrol.

Any ideas?

The hierarchy looks something like this:

<Grid>
 <Canvas>
  <UserControl>
   <Canvas>
    <Line/>
    <Rectangle/>
   </Canvas>
  </UserControl>
 </Canvas
</Grid>
+5
source share
3 answers

, , . ( , , , /), , , , IsHitTestVisible false , .

, , / , , 1 , , /, .

.

+2

Usercontrol x: Null, . "", , usercontrol.

usercontrols; WPF. , , , , .

+4

, , , . . , , , , : .

I tried to put a tooltip on my root canvas, and it really shows up, but not on my individual child user controls, nor on their inner canvas / children, even if they have a background / set of fills.

In addition, the placement of the MouseEnter event indicates that it actually fires when the mouse enters the inner canvas, but the tooltip will not appear.

0
source

All Articles