如何在 Silverlight 中创建数字文本框? [英] How to create a numeric textbox in Silverlight?

查看:23
本文介绍了如何在 Silverlight 中创建数字文本框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所说的那样.我看过从 TextBox 继承,但唯一合理的覆盖是OnKeyDown",但这只是给我一个来自 Key 枚举的键(无法使用 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()).

推荐答案

查看 Toolkit 中的 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.

这篇关于如何在 Silverlight 中创建数字文本框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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