Solved

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

Posted on 2014-09-25
2
311 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
visual Basic Net vs c# net 8 56
asp.net bundle 8 36
Wpf develop 5 32
Red error squiggly on vb.net 7 11
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.
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.
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

758 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

23 Experts available now in Live!

Get 1:1 Help Now