正如标题所说真的。 我看了一下从文本框继承,但唯一明智的倍率是的onkeydown,但这只是给了我从密钥枚举的关键(没有办法用Char.IsNumeric())。
As the title says really. I've had a look at inheriting from TextBox, but the only sensible override was "OnKeyDown", but that just gives me a key from the Key enum (with no way to use Char.IsNumeric()).
看看的NumericUpDown工具包的http:// codeplex.com / Silverlight的,也许你可以使用或查看源代码来实现自己的数字文本框。
Take a look at NumericUpDown in the Toolkit http://codeplex.com/Silverlight and maybe you can use that or look at the source to implement your own numeric textbox.