Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
KeyDown以前にイベントトリガーを作ることは可能TextChangedですか?
KeyDown
TextChanged
これら 2 つのイベントを簡単に追加したので、キーが押されたTextBoxかどうかを確認したいと思います。Deleteはいの場合、いいえ<do nothing>の場合<so something>。booleanを押した場合に「記憶」するフィールドを作成しましたDeleteが、問題は のKeyDown後にトリガーさTextChangedれるため、機能しません...
TextBox
Delete
<do nothing>
<so something>
boolean
イベントはPreviewKeyDown?
PreviewKeyDown
編集:
PreviewKeyDownイベントはトンネリング ルーティング イベントであり、包含階層を下って移動します。 KeyDownイベントはバブリング ルーティング イベントであり、包含階層を上に移動します。