开发者

WPF: How do I prevent users from entering text in a Textbox data bound to a numeric property?

WPF: How do I prevent users from entering text in a开发者_StackOverflow Textbox data bound to a numeric property?


The standard validation will handle this...

You can also use a Behavior or attached property to override TextBox's input to prevent non-numeric numbers from being entered. Here is a sample behavior that does this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜