WPF 禁止输入法 IME
InputMethod.IsInputMethodEnabled
https://learn.microsoft.com/zh-cn/dotnet/api/system.windows.uielement.isinputmethodenabled?view=netframework-4.8.1
针对Listbox,如果也要禁止IME,需要禁止ListboxItem的IsInputMethodEnabled
<Style TargetType="{x:Type ListBoxItem}"> <Setter Property="InputMethod.IsInputMethodEnabled" Value="False"/> </Style>
针对其他控件比如TextBox
<TextBox InputMethod.IsInputMethodEnabled="False" />
标签:控件,输入法,禁止,IME,IsInputMethodEnabled,WPF From: https://www.cnblogs.com/crazyghostvon/p/17624808.html