TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Edwin Antonio Arroyo Lopez
NA
6
0
Validations
Dec 1 2009 10:08 AM
I need to validate the fields of my textBox ...
In WPF ...
Someone could give me a code that works in the KeyDown event ...
Or enter special characters not allowed ...
I have these two codes:
1 this I agree but also allows ALT numbers and Shipf ...
Need only numbers or only letters ...
KeyDown
if (e.key> = Key.D0 & & e.key <= Key.D9 | | e.key> = Key.NumPad0 & & e.key <= Key.NumPad9 | | == e.key Key.Decimal)
e.Handled = false;
else
e.Handled = true;
And this helps us letters and do not know how to modify it to only numbers
Event: KeyDown
Accepted String = "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm" + Convert.ToChar (8);
if (Aceptados.Contains ( "" + e.key)) e.Handled = false; else e.Handled = true;
Someone could help
Reply
Answers (
2
)
XAML in XAML
ControlTemplate TemplateBinding Newbie Question