In C#, we have the following:
- A
UserControlcontaining aPictureBoxand an invisibleFlowPanel.
What I want to achieve:
- When the
UserControlis hovered (MouseHover), the invisibleFlowPanelwill be set tovisible = true. When the mouse leaves theUserControlorFlowPanel, theFlowPanelshould be setvisible = false.
Using MouseLeave on UserControl doesn't do the job, because this event is triggered when the mouse enters FlowPanel. Hiding the FlowPanel when the mouse leaves FlowPanel does it, but is buggy (sometimes MouseLeave is triggered, sometimes not).
What's the best way to fix this?