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.
精彩评论