Equivalent to a keypreview property in WPF

后端 未结 3 782
春和景丽
春和景丽 2021-01-02 16:35

I\'m pondering taking the plunge to WPF from WinForms for some of my apps, currently I\'m working on the combined barcode-reader/text-entry program (healthcare patient forms

3条回答
  •  悲哀的现实
    2021-01-02 17:12

    WPF uses event bubbling and tunneling. In other words the events travel down and up the visual element tree. Some events will have a corresponding Preview event. So MouseDown will have a PreviewMouseDown that you can respond to. Check out this link and scroll down to the WPF Input Events section.

提交回复
热议问题