Handling and Reporting WPF Data Binding Validation Errors and Exceptions

3 04 2008

This last month Karl has been obsessed with WPF business object data binding, and the .NET 3.5 support for the IDataErrorInfo interface.

He posted an informative article entitled Handling and Reporting WPF Data Binding Validation Errors and Exceptions.

This article, which includes a Silverlight video, challenges the reader to fully understand what messages the WPF data binding pipeline routes to the UI and how to report/handle exceptions thrown during the data binding process. It includes a demo application that throws exceptions at different locations in the source object and how to create robust code that can deal with them gracefully.

A custom value converter and Validation.ErrorTemplate combine to provide a developer with the capability to display inner exception messages should they be routed to the UI. Additionally, this article explains why using a trigger to set a ToolTip for displaying an error message may not be a good practice.



4 responses

4 09 2012

Thank you very much. It is a post useful…

4 09 2012

Your article is very useful for me. Thank you for share.

27 02 2013

I like post.

21 08 2013
real estate cable displays

00 a vehicle, and it is a 15 min light and music show, with a gift
shop at the end, complete with a Santa. I recently had the chance to test the Earbud Yo-Yo.
The strut channels are manufactured out of a sheet of steel with a coating of zinc,
paint, epoxy and other varnishes and rarely they are also manufactured from stainless steels when the concern is of rusting or when weight is an

Leave a Reply to loanntt Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: