Adapts an instance of ValidationHelper to the INotifyDataErrorInfo interface.
Inheritance: INotifyDataErrorInfo
        protected ValidatableViewModelBase()
        {
            Validator = new ValidationHelper();

            NotifyDataErrorInfoAdapter = new NotifyDataErrorInfoAdapter(Validator);
            NotifyDataErrorInfoAdapter.ErrorsChanged += OnErrorsChanged;
        }
		public ValidatableViewModelBase()
		{
			Validator = new ValidationHelper();

#if SILVERLIGHT
			NotifyDataErrorInfoAdapter = new NotifyDataErrorInfoAdapter(Validator);
#else
			DataErrorInfoAdapter = new DataErrorInfoAdapter(Validator);
#endif

			OnCreated();
		}
Exemplo n.º 3
0
 public ValidationViewModel()
     : base()
 {
     Validator = new ValidationHelper();
     NotifyDataErrorInfoAdapter = new NotifyDataErrorInfoAdapter(Validator);
 }
 public ValidatableViewModelBase()
 {
     Validator = new ValidationHelper();
     notifyDataErrorInfoAdapter = new NotifyDataErrorInfoAdapter(Validator);
     PropertyChanged += delegate { Validator.ValidateAll(); };
 }