文本框仅大写

use*_*835 1 c# windows-phone-7 windows-phone windows-phone-8

我想要TextBox唯一的大写字母。在 Windows Phone 中它没有CharacterCasing,我能想到的唯一解决方案是:

private void textBox_TextChanged(object sender, TextChangedEventArgs e)
{
   textBox.Text = textBox.Text.ToUpper();
}
Run Code Online (Sandbox Code Playgroud)

每次用户按下一个不好的键时,它都会执行该过程。有没有更好的办法?

Mil*_*ler 6

或者,您可以在文本框属性中设置CharacterCasingto Upper