开发者

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

开发者 https://www.devze.com 2022-12-21 16:42 出处:网络
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...

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

精彩评论

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

关注公众号