Numeric Data Entry in WPF

前端 未结 17 2548
情话喂你
情话喂你 2020-12-02 05:38

How are you handling the entry of numeric values in WPF applications?

Without a NumericUpDown control, I\'ve been using a TextBox and handling its PreviewKeyDown eve

17条回答
  •  粉色の甜心
    2020-12-02 06:08

    You can also try using data validation if users commit data before you use it. Doing that I found was fairly simple and cleaner than fiddling about with keys.

    Otherwise, you could always disable Paste too!

提交回复
热议问题