How to prevent clicks from passing through a control to the one below it

前端 未结 3 1191
挽巷
挽巷 2021-01-18 13:46

I have a textbox in a groupbox, both with double click events. When I double click in the textbox both events are triggered.

How do I stop clicks in the textbox from

3条回答
  •  再見小時候
    2021-01-18 14:48

    you should handle e.Handled in the PreviewDoubleClick because tunneled events happens before bubbled up ones.

    also why would you need to handle that event in both textbox and groupbox ? as it is getting fired in both because 2 separate events are getting fired.

提交回复
热议问题