Ejemplo n.º 1
0
        /// <summary>
        /// Validates the bindings.
        /// </summary>
        /// <returns></returns>
        public ValidationResult ValidateBindings()
        {
            var result = new ValidationResult();

            foreach(var info in GetBindings())
            {
                var validatedProperty = _element.Type.ValidateAgainst(_element, info.Property, info.Binding);
                result.Add(validatedProperty);
            }

            var triggerValidator = new TriggerValidator(_element.Type, _element, _element.Style.Triggers);
            result.Add(triggerValidator.ValidateBindings());

            return result;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Validates the bindings.
        /// </summary>
        /// <returns></returns>
        public ValidationResult ValidateBindings()
        {
            var result = new ValidationResult();

            foreach (var info in GetBindings())
            {
                var validatedProperty = element.Type.ValidateAgainst(element, info.Property, info.Binding);
                result.Add(validatedProperty);
            }

            var triggerValidator = new TriggerValidator(element.Type, element, element.Style.Triggers);

            result.Add(triggerValidator.ValidateBindings());

            return(result);
        }