Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How to bind a TextBox to Just allow first Letter(1, 2 Or Any Alphabetic)

$
0
0

Hello,

How i can bind my Textbox to just get only 1, 2 and Any Alphabet in it as it's first character. If any other letter will be there it should delete all the string in Textbox.  I want to bind it to get only string that are starting with 1, 2 or Alphabetic. Example are here that should be accepted.

Should Be Acceptable in TextBox

1. 1000000000

2. 2000000000

3. A100000000

4. A200000000

5. A300000000

Strings that should not acceptable.

1. 3000000000

2. 4000000000

5. 0000000000

6. 9000000000

 

Thanks


Jazaib Hussain


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>