Solved

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

Posted on 2014-09-25
2
375 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

734 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