文本框仅输入字符 [英] text box enter only characters

查看:74
本文介绍了文本框仅输入字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文本框仅在wpf中输入字符......................

The text box enter only characters in wpf.....................

推荐答案

<TextBox Name="txtProductCode">
  <TextBox.Text>
    <Binding Path="ProductCode">
      <Binding.ValidationRules>
        <jas:RegexValidationRule

          RegexText="^[A-Za-z]*


" span> =" 仅输入字符" span> =" IgnoreCase" > < /Binding.ValidationRules > < /Binding > < /TextBox.Text > < /TextBox >
" ErrorMessage="Enter only character" RegexOptions="IgnoreCase" /> </Binding.ValidationRules> </Binding> </TextBox.Text> </TextBox>


请查看该网址


http://wpftutorial.net/DataValidation.html?showallcomments [
please view this url


http://wpftutorial.net/DataValidation.html?showallcomments[^]


这篇关于文本框仅输入字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆