C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






wpf textbox validation?


Posted Date: 30 Aug 2008      Total Responses: 1

Posted By: Kannabiran       Member Level: Silver     Points: 1


Hi Guys,

Im using Xaml textbox,now i want to validate the textbox,like accepting only numbers or accepting only alphabets,i have referred some some site theres no clear solution.if anyone knows help me..

Regrds

Kanna..




Responses

Author: Santhi    22 Nov 2008Member Level: GoldRating:     Points: 5
Hi,
Use the built-in ExceptionValidationRule this way:



<Binding Source="{StaticResource data}" Path="Age"

UpdateSourceTrigger="PropertyChanged">

<Binding.ValidationRules>

<ExceptionValidationRule/>

</Binding.ValidationRules>

</Binding>


Or you can add an ExceptionValidationRule to the Binding to prevent the user from entering an invalid type.




Post Reply
You must Sign In to post a response.
Next : Can we use WPF in .NET 2.0?
Previous : Stackpanel visibility problem??
Return to Discussion Forum
Post New Message
Category: WPF

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

conference calls

Contact Us    Privacy Policy    Terms Of Use