Exemple #1
0
        /// <summary>
        /// Attempts to create the target property expressions for this <c>MultiBinding</c>.
        /// </summary>
        /// <returns>
        /// <see langword="true"/> if the target property expression was successfully created, otherwise <see langword="false"/>.
        /// </returns>
        protected override PropertyExpression AttemptCreateTargetPropertyExpression()
        {
            var targetObject = TargetObject;

            if (targetObject == null || _targetPath == null)
            {
                return(null);
            }

            return(PathPropertyExpression.FromPath(targetObject, _targetPath, BindOnValidation));
        }
Exemple #2
0
        /// <summary>
        /// Attempts to create the <see cref="PropertyExpression"/> for this <c>Binding</c>'s source.
        /// </summary>
        /// <returns>
        /// The <see cref="PropertyExpression"/>, or <see langword="null"/> if the property expression cannot be created.
        /// </returns>
        protected override PropertyExpression AttemptCreateSourcePropertyExpression()
        {
            var sourceObject = SourceObject;

            if (sourceObject == null || _sourcePath == null)
            {
                return(null);
            }

            return(PathPropertyExpression.FromPath(sourceObject, _sourcePath, BindOnValidation));
        }