wpf怎么在textbox上设置输入法
1、WPF控制项输入法设定,新的Windows版本碰到TextBox会预设使用注音,有的时候,我们会想设定让TextBox使用英文,当使用者想使用中文再自行切换。

3、Style的写法: <Setter Property="InputMethod.InputScope"> <Setter.Value> <InputScope> <InputScope.Names> <InputScopeName NameValue="AlphanumericHalfWidth"></InputScopeName> </InputScope.Names> </InputScope> </Setter.Value> </Setter>

5、如果是DataGrid要放在Datagrid.CellstyleCode的写法:InputScope scope = new InputScope();InputScopeName name = new InputScopeName();name.NameValue = InputScopeNameValue.AlphanumericHalfWidth;scope.Names.Add(name);TextBox txt = d as TextBox;txt.InputScope = scope;

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:53
阅读量:42
阅读量:32
阅读量:31
阅读量:88