Solved

WPF Validation. What is happening during the UpdatedValue step and CommittedValue step

Posted on 2014-09-25
2
322 Views
Last Modified: 2014-10-01
I'm trying to understand the validation steps that data passes along from target to source.
in the setter of a property which line of code represents each step, (or for the CommittedValue step is that after the setter code has terminated)?
0
Comment
Question by:quentinA
2 Comments
 
LVL 15

Accepted Solution

by:
Ess Kay earned 500 total points
ID: 40352735
The process of validating user input and updating the source now looks like this (using a TextBox bound to a source property of type int, as an example):
1. Run the ValidationRules marked as RawProposedValue, using the (string) value in TextBox.Text
2. Convert the string value to int, using user-supplied and/or built-in converters
3. Run the ValidationRules marked as ConvertedProposedValue, using the int value
4. Write the (int) value into the source property
5. Run the ValidationRules marked as UpdatedValue
6. Commit the source object, if applicable (this means calling IEditableObject.EndEdit() )
7. Run the ValidationRules marked as CommittedValue

If any of the validation rules fail, the process stops and validation errors are routed to the usual places.

This feature is scheduled to be included in WPF 3.5SP1.



From microsoft team: https://connect.microsoft.com/VisualStudio/feedback/details/299711/wpf-validationrule-is-called-before-ivalueconverter
0
 

Author Closing Comment

by:quentinA
ID: 40355777
Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now