public ValidatableViewModelBase()
		{
			Validator = new ValidationHelper();

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

			OnCreated();
		}
Esempio n. 2
0
        public BaseVM()
        {
            Validator = new ValidationHelper();
            DataErrorInfoAdapter = new DataErrorInfoAdapter(Validator);
            Validator.ResultChanged += (o, e) =>
            {
                var propertyName = e.Target as string;

                if (!string.IsNullOrEmpty(propertyName))
                {
                    RaisePropertyChangedEvent(propertyName);
                }
            };
        }
 public ValidatableViewModelBase()
 {
     Validator = new ValidationHelper();
     DataErrorInfoAdapter = new DataErrorInfoAdapter(Validator);
     OnCreated();
 }
Esempio n. 4
0
 protected ValidatableViewModel()
 {
     Validator = new ValidationHelper();
     DataErrorInfoAdapter = new DataErrorInfoAdapter(Validator);
     OnCreated();
 }