all groups > dotnet sdk > march 2008 >
You're in the

dotnet sdk

group:

IDataErrorInfo.Error usage?


IDataErrorInfo.Error usage? Jim Hudson
3/11/2008 5:51:03 AM
dotnet sdk:
I recently started using the .Net 3.5 validation facilities (IDataErrorInfo
and ValidatesOnDataErrors) in my C# application, and I find that they work
great. I've now run into a situation where I want to have a XAML control
check IDataErrorInfo.Error, instead of IDataErrorInfo.Item.

Basically, I'd like to know of a Binding property that will trigger the
testing of IDataErrorInfo.Error, in the way that ValidatesOnDataErrors causes
the testing of IDataErrorInfo.Item.

I've read Karl Shifflett's "WPF Business Application Series" at CodeProject,
and Josh Smith's blog and Sacha Barber's blog, and they show how to set up a
data binding to IDataErrorInfo.Error, treating it like any other property. I
can set that up (via INotifyPropertyChanged), but ValidatesOnDataErrors is
just SOOOO easy. Is there a Binding property, like ValidatesOnDataErrors,
that will do it for me?

--
RE: IDataErrorInfo.Error usage? Jim Hudson
3/12/2008 5:28:01 AM
Thanks for th info, Linda. Would you please mention this to the WPF
development team? I think that it would be a nice enhancement.

--
Jim Hudson

RE: IDataErrorInfo.Error usage? v-lliu@online.microsoft.com
3/12/2008 10:11:52 AM
Hi Jim,

Setting the ValidatesOnDataErrors property of the Binding class only tests
of the IDataErrorInfo.Item and not of the IDataErrorInfo.Error.

The Binding class doesn't provide a property to check the
IDataErrorInfo.Error as the ValidatesOnDataErrors property to check the
IDataErrorInfo.Item so far.

To get what yo want, we have to set up a data binding to the
IDataError.Error as you have mentioned.

If you have any concern, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
RE: IDataErrorInfo.Error usage? v-lliu@online.microsoft.com
3/13/2008 3:36:21 AM
Hi Jim,

Thank you for your prompt response!

I will make a suggestion to our product team about this issue and you can
also make a suggestion in the Microsoft Connect web site by yourself as
follows:

http://connect.microsoft.com/VisualStudio/Feedback

Thank you for your contribution to the production of Microsoft and we
believe that our product will become better and better with the help of you!

Sincerely,
Linda Liu
Microsoft Online Community Support
AddThis Social Bookmark Button