public ValidationReloadedTracker(ValidationTracker validationTracker, object validationSource,
                                  IEnumerable <ValidationError> errors)
 {
     this.validationTracker = validationTracker;
     this.errors            = errors;
     if (validationSource is FrameworkElement element)
     {
         element.Loaded += ValidationSourceLoaded;
     }
     else
     {
         ((FrameworkContentElement)validationSource).Loaded += ValidationSourceLoaded;
     }
 }
Example #2
0
        public ValidationReloadedTracker(ValidationTracker validationTracker, object validationSource,
            IEnumerable<ValidationError> errors)
        {
            this.validationTracker = validationTracker;
            this.errors = errors;

            if (validationSource is FrameworkElement)
            {
                ((FrameworkElement)validationSource).Loaded += ValidationSourceLoaded;
            }
            else
            {
                ((FrameworkContentElement)validationSource).Loaded += ValidationSourceLoaded;
            }
        }