IDataErrorInfo interface implementation
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1

Thread: IDataErrorInfo interface implementation

  1. #1
    Join Date
    Nov 2008
    Posts
    14

    IDataErrorInfo interface implementation

    Hello All
    I am trying to implement MVVM and use IDataErrorInfo interface to validate data in the model classes

    I base model class implementing IDataErrorInfo interface

    Code:
    public class BaseClass: IDataErrorInfo
    {
       <Properties and Members of BaseClass>
     
            #region IDataErrorInfo
            public string Error
            {
                get { return String.Empty; }
            }
            public string this[string PropertyName]
            {
                get { return this.GetValidationError(PropertyName); }
            }
            #endregion
    }
    Now I want drive a class from Base class

    Code:
    public class DrivedClass: BaseClass
    {
    }
    How do I use IDataErrorInfo members in the derived class to carryout validation of the properties in the derived class??
    Last edited by RadKrish; May 20th, 2013 at 01:51 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center