【发布时间】:2015-10-06 08:31:45
【问题描述】:
我有代码
private void DataGridTypePayments_PreviewTextInput(object sender, TextCompositionEventArgs e)
{
e.Handled = new Regex("[^0-9]+").IsMatch(e.Text);
}
我需要输入数字或退格。如何禁用输入符号空间?
【问题讨论】:
-
Ty 在末尾附加 '$' (^[0-9]*$) 检查此答案stackoverflow.com/questions/19715303/…