示例#1
0
        public System.Windows.Documents.Adorner CreateAdorner(Validation.ExtendedValidationResult validationResult, System.Windows.UIElement element)
        {
            Adorner adorner;

            if (validationResult.ShouldBlock)
            {
                adorner = new MyErrorAdorner(element)
                {
                    Text = validationResult.Message
                }
            }
            ;
            else
            {
                adorner = new MyWarningAdorner(element)
                {
                    Text = validationResult.Message
                }
            };
            adorner.IsHitTestVisible = false;
            return(adorner);
        }

        #endregion
    }
        public bool Equals(ExtendedValidationResult result)
        {
            if (ReferenceEquals(null, result))
            {
                return(false);
            }
            if (ReferenceEquals(this, result))
            {
                return(true);
            }

            return((Result == result.Result) && (Message == result.Message) && (Actions == result.Actions));
        }