Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2014-09-25
2
Medium Priority
?
509 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 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Loops Section Overview
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

972 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