Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / March 2008

Tip: Looking for answers? Try searching our database.

IDataErrorInfo.Error usage?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim Hudson - 11 Mar 2008 13:51 GMT
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?

Signature

Jim Hudson

Linda Liu[MSFT] - 12 Mar 2008 11:11 GMT
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.
Jim Hudson - 12 Mar 2008 13:28 GMT
Thanks for th info, Linda.  Would you please mention this to the WPF
development team?  I think that it would be a nice enhancement.

Signature

Jim Hudson

Linda Liu[MSFT] - 13 Mar 2008 04:36 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.