TextBox TextChanged event on programmatic versus user change of text contents

后端 未结 8 1729
日久生厌
日久生厌 2020-12-15 18:16

I would like to differentiate between changing the text programmatically (for example in a button click handler event) and user input (typing, cutting and pasting text). <

8条回答
  •  太阳男子
    2020-12-15 18:36

    I had this problem too, but for my case it was enough to listen to the (Preview)TextInput event instead of using Meleak's rather complex solution. I realize that's not a complete solution if you have to listen for programmatic changes aswell, but in my case it worked fine.

提交回复
热议问题