An example of System.Windows.Input.TextCompositionManager
when input with CJK IME.
Class TextCompositionManager
has three events: PreviewTextInputEvent
, PreviewTextInputStartEvent
, and PreviewTextInputUpdateEvent
(have bubbling/routed variants)
I'm testing four different languages/IMEs, and found that Korean IME has different behaviors than Chinese/Japanese IMEs.
- Pressed S, text is now
ㄋ
PreviewTextInputStart -> PreviewTextInputUpdate -> TextChanged
- Pressed U, text is now
ㄋㄧ
PreviewTextInputUpdate -> TextChanged
- Pressed 3, text is now
你
PreviewTextInputUpdate -> TextChanged
- Pressed C, text is now
你ㄏ
PreviewTextInputUpdate -> TextChanged
- Pressed L, text is now
你ㄏㄠ
PreviewTextInputUpdate -> TextChanged
- Pressed 3, text is now
你好
PreviewTextInputUpdate -> TextChanged
- Pressed Enter, text is now
你好
PreviewTextInputUpdate -> PreviewTextInput -> TextChanged
- Pressed N, text is now
n
PreviewTextInputStart -> PreviewTextInputUpdate -> TextChanged
- Pressed I, text is now
ni
PreviewTextInputUpdate -> TextChanged
- Pressed H, text is now
ni'h
PreviewTextInputUpdate -> TextChanged
- Pressed A, text is now
ni'ha
PreviewTextInputUpdate -> TextChanged
- Pressed O, text is now
ni'hao
PreviewTextInputUpdate -> TextChanged
- Pressed Enter, text is now
你好
PreviewTextInputUpdate -> PreviewTextInput -> TextChanged
- Pressed O, text is now
お
PreviewTextInputStart -> PreviewTextInputUpdate -> TextChanged
- Pressed H, text is now
おh
PreviewTextInputUpdate -> TextChanged
- Pressed I, text is now
おは
PreviewTextInputUpdate -> TextChanged
- Pressed I, text is now
おはい
PreviewTextInputUpdate -> TextChanged
- Pressed Y, text is now
おはいy
PreviewTextInputUpdate -> TextChanged
- Pressed O, text is now
おはいよ
PreviewTextInputUpdate -> TextChanged
- Pressed Enter, text is now
おはいよ
PreviewTextInputUpdate -> PreviewTextInput -> TextChanged
- Pressed G, text is now
ㅎ
PreviewTextInputStart -> TextChanged
- Pressed K, text is now
하
PreviewTextInputUpdate -> TextChanged
- Pressed S, text is now
한
PreviewTextInputUpdate -> TextChanged
- Pressed R, text is now
한ㄱ
PreviewTextInput -> PreviewTextInputStart -> TextChanged
- Pressed M, text is now
한그
PreviewTextInputUpdate -> TextChanged
- Pressed F, text is now
한글
PreviewTextInputUpdate -> TextChanged
- Pressed Enter, text is now
한글
PreviewTextInput -> PreviewTextInputStart -> PreviewTextInput