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

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

问题描述

正如标题所说真的。 我看了一下从文本框继承,但唯一明智的倍率是的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.

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

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