开发者

OnPreviewTextInput not always providing Text

开发者 https://www.devze.com 2023-04-09 19:05 出处:网络
We have an existing application we are trying to replace with a new WPF application. One of the controls we use in the legacy application has a specialized behavior where the control redirects any te

We have an existing application we are trying to replace with a new WPF application.

One of the controls we use in the legacy application has a specialized behavior where the control redirects any text input by the user to be processed externally. After which the result is updated programmatically back into the control. (the control behaves similarly to a read-only TextBox in that the user is not allowed edit text directly in the control; any text the user types is redirected before it 开发者_JAVA百科is shown in the control)

We settled on using the OnPreviewTextInput event to redirect e.Text and mark the event as e.Handled. This worked using English input as well as the Microsoft Japanese IME. But when we tried using the Microsoft Korean IME, e.Text comes through as an empty string...

Any thoughts on why it would work for Japanese, but not for Korean?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号