public bool DataContextTargetBinding(DataContextTargetBindingNode dataContextTargetBindingNode, Parameters parameters, Context context)
        {
            var result = this.VisitDefiniteBinding(dataContextTargetBindingNode);

            this.VisitChildBindings(dataContextTargetBindingNode.Bindings, parameters, context);
            if (result)
            {
                context.XamlModificationTracker.Add(dataContextTargetBindingNode.TargetElement, new BindingXamlModification(dataContextTargetBindingNode.Id, dataContextTargetBindingNode.BindingAssignment, context.XamlElementNameProvider));

                return(true);
            }

            return(false);
        }
示例#2
0
        public bool DataContextTargetBinding(
            DataContextTargetBindingNode dataContextTargetBindingNode,
            Parameters parameters,
            Context context)
        {
            var stringBuilder = new StringBuilder();
            var result        = this.VisitDefiniteBinding(dataContextTargetBindingNode, parameters, context, stringBuilder);

            if (result)
            {
                this.VisitChildBindings(dataContextTargetBindingNode.Bindings, parameters, new Context(stringBuilder, result.Value.BindingSource, context));
                context.BindingContainerSourceCodeBuilder.Append(stringBuilder);
                return(true);
            }

            return(false);
        }
 public void DataContextTargetBinding(DataContextTargetBindingNode dataContextTargetBindingNode, StringBuilder stringBuilder, int indent)
 {
     PrivateVisit(stringBuilder, indent, dataContextTargetBindingNode, dataContextTargetBindingNode.Bindings);
 }