自动大写WPF中的所有输入 [英] Automatically capitalize all input in WPF

查看:115
本文介绍了自动大写WPF中的所有输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以自动将WPF应用中的所有输入大写?

Is there a way to automatically capitalize all input throughout a WPF app?

推荐答案

您可以使用以下属性将所有输入到TextBox控件的大小写:

You can case all input into TextBox controls with the following property:

CharacterCasing="Upper"

要应用于整个应用程序中的所有TextBox控件,请为所有TextBox控件创建样式:

To apply to all TextBox controls in the entire application create a style for all TextBox controls:

<Style TargetType="{x:Type TextBox}">
    <Setter Property="CharacterCasing" Value="Upper"/>
</Style>

这篇关于自动大写WPF中的所有输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆