Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-09-25
2
Medium Priority
?
472 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 2000 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

721 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